/*
Theme Name: Between Words
Theme URI: https://github.com/abolfaazl
Author: abolfaazl
Author URI: https://github.com/abolfaazl
Description: A minimal writing-focused classic WordPress theme for personal essays, podcasts, galleries, and image posts.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: between-words
Tags: blog, one-column, two-columns, custom-menu, featured-images, rtl-language-support, translation-ready
Copyright (c) 2026 abolfaazl
*/

* {
  box-sizing: border-box;
}

:root {
  --bw-bg: #fff;
  --bw-surface: #fff;
  --bw-text: #111;
  --bw-muted: #5f5f5f;
  --bw-border: #d8d8d8;
  --bw-card: #fff;
  --bw-soft: #f1f1f1;
  --bw-accent: #111;
  --bw-font-body: "Vazirmatn", "IRANSans", "Segoe UI", Tahoma, Arial, sans-serif;
  --bw-font-heading: var(--bw-font-body);
}

html {
  direction: rtl;
}

body {
  margin: 0;
  background: var(--bw-bg);
  color: var(--bw-text);
  font-family: var(--bw-font-body);
  font-size: 14px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.brand h1,
.post-title,
.article-title,
.side-title,
.sidebar-title,
.sidebar-heading,
.archive-title,
.single-title,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--bw-font-heading);
}

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

button,
input,
textarea {
  font-family: inherit;
}

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

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.alignleft {
  float: left;
  margin: 0 1.5em 1em 0;
}

.alignright {
  float: right;
  margin: 0 0 1em 1.5em;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text,
.gallery-caption {
  margin-top: 0.5rem;
  color: var(--bw-muted);
  font-size: 0.875rem;
}

.sticky,
.bypostauthor {
}

html[dir="rtl"] .alignleft {
  float: right;
  margin: 0 0 1em 1.5em;
}

html[dir="rtl"] .alignright {
  float: left;
  margin: 0 1.5em 1em 0;
}

.post-image,
.post-image img,
.single-featured-image,
.single-featured-image img,
.single-content img,
.page-content img,
.wp-block-image img,
.wp-block-gallery img,
.gallery-strip img,
.placeholder {
  border-radius: 5px;
}

.single-featured-image,
.wp-block-image,
.wp-block-gallery,
.gallery-strip {
  overflow: hidden;
}

.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;
}

.skip-link:focus {
  clip: auto;
  width: auto;
  height: auto;
  margin: 10px;
  padding: 10px 12px;
  background: #111;
  color: #fff;
  z-index: 9999;
}

.page {
  width: 1194px;
  max-width: calc(100% - 110px);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: 132px;
  border-bottom: 1px solid #8d8d8d;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  direction: ltr;
  background: var(--bw-bg);
}

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

.header-left {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 54px;
  direction: ltr;
}

.header-right {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 24px;
  direction: ltr;
}

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

.header-icon-button {
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--bw-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.header-icon-button:hover,
.header-icon-button:focus-visible {
  background: var(--bw-soft);
  outline: none;
}

.header-icon-button svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.theme-icon {
  display: none;
}

.bw-theme-cycle:not([data-current-mode]) .theme-icon-light,
html[data-bw-display-mode="light"] .theme-icon-light,
html[data-bw-display-mode="dark"] .theme-icon-dark,
html[data-bw-display-mode="reader"] .theme-icon-reader {
  display: block;
}

.header-icon-button.is-active {
  color: var(--bw-accent);
}

.brand {
  grid-column: 2;
  text-align: center;
  white-space: nowrap;
  direction: rtl;
  padding-top: 4px;
}

.brand h1 {
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 900;
  color: #000;
  letter-spacing: -2px;
}

.brand-title {
  margin: 0;
  font-size: 40px;
  line-height: 1.05;
  font-weight: 900;
  color: #000;
  letter-spacing: -2px;
  font-family: var(--bw-font-heading);
}

.brand p {
  margin: 11px 0 0;
  font-size: 14px;
  line-height: 1;
  font-weight: 500;
  color: #111;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 52px;
  direction: rtl;
}

.main-nav a {
  font-size: 13px;
  font-weight: 500;
  color: #111;
}

.current-date {
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  color: #111;
  direction: rtl;
}

.hamburger {
  width: 22px;
  height: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: #111;
}

.search-icon {
  width: 21px;
  height: 21px;
  position: relative;
  flex: 0 0 21px;
  display: block;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.search-icon::before {
  content: "";
  position: absolute;
  width: 13px;
  height: 13px;
  border: 2px solid #111;
  border-radius: 50%;
  top: 0;
  left: 0;
}

.search-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background: #111;
  transform: rotate(45deg);
  left: 13px;
  top: 14px;
  border-radius: 2px;
}

.main-layout,
.single-layout {
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 48px;
  margin-top: 38px;
}

.sidebar {
  grid-column: 1;
  text-align: right;
}

body.bw-no-sidebar .main-layout,
body.bw-no-sidebar .single-layout {
  grid-template-columns: minmax(0, 1fr);
}

body.bw-no-sidebar .sidebar.bw-sidebar-empty {
  display: none;
}

.posts,
.single-main {
  grid-column: 2;
  border-right: 1px solid #d8d8d8;
  padding-right: 48px;
  min-width: 0;
}

.post-card {
  display: grid;
  grid-template-columns: 370px minmax(0, 1fr);
  gap: 38px;
  min-height: 213px;
  padding-bottom: 31px;
  margin-bottom: 17px;
  border-bottom: 1px solid #ddd;
}

.post-image {
  width: 370px;
  height: 178px;
  border-radius: 5px;
  overflow: hidden;
  background: #e3e3e3;
}

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

.placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.placeholder-1 {
  background: radial-gradient(circle at 48% 57%, rgba(185, 70, 56, 0.82) 0 9%, transparent 10%), linear-gradient(155deg, transparent 0 52%, rgba(188, 70, 55, 0.8) 53% 67%, transparent 68%), linear-gradient(12deg, #7b786f 0 22%, #8b887e 23% 42%, #56554f 43% 100%);
}

.placeholder-2 {
  background: radial-gradient(circle at 50% 28%, #181818 0 16%, transparent 17%), radial-gradient(circle at 47% 35%, #141414 0 28%, transparent 29%), linear-gradient(180deg, #555550 0 42%, #c6c2b6 43% 100%);
  filter: grayscale(1);
}

.placeholder-3 {
  background: radial-gradient(circle at 52% 50%, rgba(255, 255, 255, 0.78), transparent 21%), repeating-linear-gradient(92deg, rgba(255, 255, 255, 0.55) 0 1px, transparent 1px 14px), linear-gradient(90deg, #565656, #d1d1d1 49%, #4e4e4e);
}

.placeholder-4 {
  background: radial-gradient(circle at 61% 62%, #111 0 3%, transparent 3.5%), linear-gradient(180deg, #e3e3e3, #cdcdcd);
}

.placeholder-4::before {
  content: "";
  position: absolute;
  width: 55px;
  height: 65px;
  right: 94px;
  bottom: 35px;
  border: 7px solid #171717;
  border-top-width: 12px;
  transform: skewY(-4deg);
}

.placeholder-4::after {
  content: "";
  position: absolute;
  width: 85px;
  height: 2px;
  right: 76px;
  bottom: 28px;
  background: #171717;
  box-shadow: 21px -30px 0 -0.5px #171717, 9px -12px 0 -0.5px #171717, 48px -12px 0 -0.5px #171717;
  transform: rotate(-2deg);
}

.post-content {
  padding-top: 2px;
  min-width: 0;
}

.post-date,
.archive-kicker {
  font-size: 12px;
  line-height: 1;
  color: #5f5f5f;
  margin-bottom: 14px;
}

.post-title {
  margin: 0 0 15px;
  font-size: 26px;
  line-height: 1.32;
  font-weight: 900;
  color: #000;
  letter-spacing: -0.75px;
  font-stretch: condensed;
}

.post-excerpt {
  margin: 0;
  max-width: 390px;
  font-size: 13px;
  line-height: 2.18;
  color: #252525;
  font-weight: 400;
}

.post-footer {
  max-width: 390px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 21px;
}

.post-card-cta {
  order: 1;
}

.post-card-time {
  order: 2;
}

.read-more,
.side-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  direction: inherit;
  font-size: 13px;
  font-weight: 500;
  color: #111;
}

.side-link {
  margin-top: 22px;
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  direction: ltr;
}

.link-arrow svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.link-text {
  display: inline-block;
}

.read-time {
  font-size: 11px;
  font-weight: 400;
  color: #676767;
  flex: 0 0 auto;
}

.load-more-wrap {
  display: flex;
  justify-content: center;
  margin-top: -2px;
}

.load-more,
.pagination .page-numbers,
.newsletter-form button,
.search-submit {
  width: 255px;
  height: 34px;
  background: #fff;
  border: 1px solid #9b9b9b;
  color: #111;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.pagination .page-numbers {
  width: auto;
  min-width: 34px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pagination .current {
  background: #111;
  color: #fff;
  border-color: #111;
}

.side-section,
.sidebar-section {
  border-bottom: 1px solid #d6d6d6;
  padding-bottom: 38px;
  margin-bottom: 31px;
}

.side-section:last-child,
.sidebar-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.side-title,
.sidebar-title {
  margin: 0 0 17px;
  font-size: 16px;
  line-height: 1.45;
  font-weight: 900;
  color: #0a0a0a;
  letter-spacing: -0.25px;
}

.side-text,
.archive-description,
.empty-state,
.page-content {
  margin: 0;
  font-size: 13px;
  line-height: 2.15;
  color: #242424;
}

.sidebar-latest-list {
  display: grid;
  gap: 18px;
}

.sidebar-latest-link {
  display: block;
}

.sidebar-latest-link .post-date {
  margin-bottom: 10px;
}

.sidebar-latest-link h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 900;
}

.podcast-card {
  width: 100%;
  min-height: 140px;
  background: #f1f1f1;
  border-radius: 3px;
  padding: 17px 16px 14px;
}

.podcast-name {
  margin: 0 0 7px;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 900;
  color: #0a0a0a;
}

.podcast-date {
  font-size: 12px;
  line-height: 1;
  color: #565656;
}

.player-row {
  display: flex;
  align-items: center;
  gap: 13px;
  direction: ltr;
  margin-top: 22px;
}

.play-button {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 50%;
  background: #000;
  position: relative;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.play-button::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 9px;
  border-left: 10px solid #fff;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
}

.play-button.is-playing::after {
  left: 11px;
  top: 9px;
  width: 12px;
  height: 14px;
  border: 0;
  background: linear-gradient(90deg, #fff 0 4px, transparent 4px 8px, #fff 8px 12px);
}

.waveform {
  height: 32px;
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 2px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  touch-action: none;
}

.waveform span {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  background: #9a9a9a;
  border-radius: 2px;
  display: block;
  position: relative;
  z-index: 1;
}

.waveform span.is-active {
  background: #111;
}

.waveform-progress {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  background: rgba(17, 17, 17, 0.08);
  pointer-events: none;
  z-index: 0;
}

.podcast-player--single .waveform {
  height: 26px;
  gap: 3px;
}

.podcast-player--single .waveform span {
  max-height: 24px;
  transform: scaleY(0.78);
  transform-origin: center;
}

.podcast-duration {
  margin-top: 9px;
  text-align: left;
  direction: ltr;
  font-size: 11px;
  color: #555;
}

.podcast-audio {
  display: none;
}

.podcast-player.is-disabled .play-button,
.podcast-player.is-disabled .waveform {
  cursor: default;
}

.podcast-player.is-disabled .waveform span {
  opacity: 0.88;
}

.play-button.is-disabled {
  opacity: 0.9;
}

.archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-list li {
  font-size: 13px;
  line-height: 2.45;
  color: #232323;
}

.archive-list a {
  display: inline-block;
}

.newsletter-text {
  margin: 0 0 13px;
  font-size: 12.5px;
  line-height: 2.05;
  color: #333;
}

.newsletter-form {
  width: 100%;
}

.newsletter-form input {
  width: 100%;
  height: 36px;
  border: 1px solid #d9d9d9;
  outline: none;
  background: #fff;
  padding: 7px 10px;
  font-size: 12px;
  color: #111;
  text-align: right;
}

.newsletter-form input::placeholder {
  color: #777;
}

.newsletter-form button,
.search-submit {
  display: block;
  width: 78px;
  height: 36px;
  margin-top: 8px;
  margin-right: auto;
  background: #090909;
  color: #fff;
  border: 0;
  border-radius: 2px;
  font-size: 12px;
  font-weight: 700;
  line-height: 36px;
  padding: 0;
}

.site-footer {
  height: 70px;
  margin-top: 13px;
  border-top: 1px solid #dedede;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  direction: ltr;
  font-size: 13px;
  color: #111;
}

.footer-icons {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 25px;
  color: #111;
}

.footer-icons svg {
  display: block;
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.footer-copy {
  grid-column: 2;
  justify-self: center;
  color: #333;
  direction: rtl;
}

.footer-links {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 22px;
  direction: rtl;
}

.archive-header {
  padding-bottom: 26px;
  margin-bottom: 30px;
  border-bottom: 1px solid #ddd;
}

.bw-breadcrumbs {
  margin-bottom: 10px;
  font-size: 11px;
  color: var(--bw-muted);
}

.bw-breadcrumbs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bw-breadcrumbs-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bw-breadcrumbs-item + .bw-breadcrumbs-item::before {
  content: "/";
  color: var(--bw-border);
}

html[dir="rtl"] .bw-breadcrumbs-item + .bw-breadcrumbs-item::before {
  content: "\\";
}

.archive-title,
.single-title {
  margin: 0;
  font-size: 32px;
  line-height: 1.5;
  font-weight: 900;
  color: #000;
  letter-spacing: -1px;
}

.single-entry {
  padding-bottom: 26px;
}

.single-header {
  text-align: center;
  padding-bottom: 22px;
}

.single-header .post-date {
  margin-bottom: 18px;
}

.single-title {
  font-size: 40px;
  line-height: 1.45;
}

.single-divider {
  width: 54px;
  height: 2px;
  background: #111;
  margin: 18px auto 0;
}

.single-featured {
  margin-bottom: 30px;
}

.single-featured .post-image,
.single-featured-image {
  width: 100%;
  height: auto;
  aspect-ratio: 740 / 370;
}

.single-featured .post-image img,
.single-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-content,
.page-content {
  font-size: 15px;
  line-height: 2.3;
  color: #202020;
}

.single-content p,
.page-content p {
  margin: 0 0 18px;
}

.single-content h2,
.single-content h3,
.single-content h4,
.page-content h2,
.page-content h3,
.page-content h4 {
  margin: 30px 0 14px;
  font-size: 24px;
  line-height: 1.7;
  font-weight: 900;
}

.single-content ul,
.single-content ol,
.page-content ul,
.page-content ol {
  margin: 0 0 20px;
  padding-right: 18px;
  line-height: 2.2;
}

.single-content blockquote,
.page-content blockquote {
  margin: 26px 0;
  padding: 0 20px 0 0;
  border-right: 2px solid #111;
  color: #333;
}

.single-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid #ddd;
  padding-top: 22px;
  margin-top: 34px;
  flex-wrap: wrap;
}

.single-meta-right,
.single-meta-left {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.single-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.single-tags a {
  font-size: 12px;
  line-height: 1;
  border: 1px solid #d4d4d4;
  padding: 8px 10px;
}

.meta-icon-link {
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.meta-icon-link svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 1.7;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.archive-grid-image .post-card,
.archive-grid-gallery .post-card {
  grid-template-columns: 370px minmax(0, 1fr);
}

.gallery-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.gallery-strip img,
.gallery-strip .post-image {
  width: 100%;
  height: 130px;
  object-fit: cover;
  border-radius: 5px;
  overflow: hidden;
}

.search-form-inline {
  margin: 0 0 22px;
}

.search-field {
  width: 100%;
  height: 36px;
  border: 1px solid #d9d9d9;
  background: #fff;
  padding: 7px 10px;
  font-size: 12px;
  color: #111;
  text-align: right;
}

.not-found-wrap {
  padding: 24px 0 10px;
}

html[dir="ltr"] {
  direction: ltr;
}

html[dir="ltr"] body {
  direction: ltr;
}

html[dir="ltr"] .brand,
html[dir="ltr"] .current-date,
html[dir="ltr"] .footer-copy {
  direction: ltr;
}

html[dir="ltr"] .main-nav {
  direction: ltr;
}

html[dir="ltr"] .main-layout,
html[dir="ltr"] .single-layout {
  grid-template-columns: minmax(0, 1fr) 270px;
}

html[dir="ltr"] .sidebar {
  grid-column: 2;
  text-align: left;
}

html[dir="ltr"] .posts,
html[dir="ltr"] .single-main {
  grid-column: 1;
  border-right: 0;
  border-left: 1px solid #d8d8d8;
  padding-right: 0;
  padding-left: 48px;
}

body.bw-no-sidebar .posts,
body.bw-no-sidebar .single-main,
html[dir="ltr"] body.bw-no-sidebar .posts,
html[dir="ltr"] body.bw-no-sidebar .single-main {
  grid-column: 1;
  border: 0;
  padding: 0;
  max-width: 900px;
  margin-inline: auto;
}

html[dir="ltr"] .newsletter-form input,
html[dir="ltr"] .search-field,
html[dir="ltr"] .single-content,
html[dir="ltr"] .page-content,
html[dir="ltr"] .side-text,
html[dir="ltr"] .archive-description,
html[dir="ltr"] .empty-state {
  text-align: left;
}

html[dir="ltr"] .newsletter-form button,
html[dir="ltr"] .search-submit {
  margin-right: 0;
  margin-left: auto;
}

html[dir="ltr"] .single-content ul,
html[dir="ltr"] .single-content ol,
html[dir="ltr"] .page-content ul,
html[dir="ltr"] .page-content ol {
  padding-right: 0;
  padding-left: 18px;
}

html[dir="ltr"] .single-content blockquote,
html[dir="ltr"] .page-content blockquote {
  padding: 0 0 0 20px;
  border-right: 0;
  border-left: 2px solid #111;
}

html[dir="ltr"] .footer-links {
  direction: ltr;
}

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

@media (max-width: 1050px) {
  .page {
    max-width: calc(100% - 56px);
  }

  .main-layout,
  .single-layout {
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 34px;
  }

  .posts,
  .single-main {
    padding-right: 34px;
  }

  html[dir="ltr"] .posts,
  html[dir="ltr"] .single-main {
    padding-left: 34px;
  }

  .post-card {
    grid-template-columns: 330px minmax(0, 1fr);
    gap: 28px;
  }

  .post-image {
    width: 330px;
  }

  .main-nav {
    gap: 34px;
  }

  .header-left {
    gap: 34px;
  }

  .header-right {
    gap: 34px;
  }
}

@media (max-width: 860px) {
  .page {
    max-width: calc(100% - 32px);
  }

  .site-header {
    height: 108px;
  }

  .brand h1,
  .brand-title {
    font-size: 31px;
  }

  .brand p {
    font-size: 12px;
    margin-top: 8px;
  }

  .main-nav,
  .current-date {
    display: none;
  }

  .main-layout,
  .single-layout {
    display: block;
    margin-top: 28px;
  }

  .sidebar,
  body.bw-no-sidebar .sidebar.bw-sidebar-empty {
    margin-bottom: 38px;
  }

  .posts,
  .single-main {
    border-right: 0;
    padding-right: 0;
  }

  html[dir="ltr"] .posts,
  html[dir="ltr"] .single-main {
    border-left: 0;
    padding-left: 0;
  }

  .post-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 18px;
    padding-bottom: 30px;
  }

  .post-image {
    width: 100%;
    height: clamp(190px, 48vw, 280px);
  }

  .post-excerpt,
  .post-footer {
    max-width: none;
  }

  .single-title {
    font-size: 31px;
  }

  .site-footer {
    height: auto;
    padding: 22px 0;
    grid-template-columns: 1fr;
    gap: 18px;
    text-align: center;
  }

  .footer-icons,
  .footer-copy,
  .footer-links {
    grid-column: 1;
    justify-self: center;
  }
}

@media (max-width: 480px) {
  .page {
    max-width: calc(100% - 24px);
  }

  .post-title {
    font-size: 22px;
  }

  .post-excerpt {
    font-size: 12.5px;
  }

  .side-title {
    font-size: 15px;
  }

  .header-left,
  .header-right {
    gap: 20px;
  }
}

.download-button {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--bw-text);
}

.download-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.waveform canvas {
  width: 100%;
  height: 100%;
  display: block;
  position: relative;
  z-index: 1;
}

.podcast-player--single .waveform canvas {
  height: 100%;
}

.meta-icon-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: pointer;
}

.share-feedback {
  opacity: 0;
  transform: translateY(2px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  font-size: 11px;
  color: var(--bw-muted);
}

.focus-mode-link {
  height: 26px;
  border: 1px solid var(--bw-border);
  background: transparent;
  color: var(--bw-text);
  padding: 0 9px;
  font-size: 11px;
  cursor: pointer;
}

.single-meta .focus-mode-link {
  display: none;
}

.focus-mode-link.is-active {
  background: var(--bw-accent);
  color: var(--bw-bg);
  border-color: var(--bw-accent);
}

.share-feedback.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.drawer-header,
.drawer-nav,
.drawer-search,
.theme-controls {
  display: none;
}

.overlay-close {
  width: 24px;
  height: 24px;
  border: 0;
  background: transparent;
  position: relative;
  cursor: pointer;
  color: var(--bw-text);
}

.overlay-close::before,
.overlay-close::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 1.5px;
  top: 11px;
  left: 3px;
  background: currentColor;
}

.overlay-close::before {
  transform: rotate(45deg);
}

.overlay-close::after {
  transform: rotate(-45deg);
}

.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 120px 24px 24px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(8px);
}

.search-overlay.is-open {
  display: flex;
}

.search-panel {
  width: min(560px, calc(100vw - 32px));
  background: var(--bw-card);
  border: 1px solid var(--bw-border);
  border-radius: 6px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
  padding: 22px;
}

.search-panel .overlay-close {
  display: block;
  margin-right: auto;
  margin-bottom: 14px;
}

.search-overlay-form {
  display: grid;
  gap: 10px;
}

.drawer-backdrop {
  display: none;
}

.theme-controls {
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.theme-controls button {
  min-width: 58px;
  height: 30px;
  border: 1px solid var(--bw-border);
  background: var(--bw-card);
  color: var(--bw-text);
  font-size: 11px;
  cursor: pointer;
}

.theme-controls button.is-active {
  background: var(--bw-accent);
  border-color: var(--bw-accent);
  color: var(--bw-bg);
}

html.bw-theme-dark {
  --bw-bg: #111;
  --bw-text: #f1f1f1;
  --bw-muted: #b9b9b9;
  --bw-border: #383838;
  --bw-card: #181818;
  --bw-soft: #222;
  --bw-accent: #f3f3f3;
}

html.bw-theme-dark body,
html.bw-theme-dark .site-header,
html.bw-theme-dark .search-panel {
  background: var(--bw-bg);
  color: var(--bw-text);
}

html.bw-theme-dark .search-overlay {
  background: rgba(0, 0, 0, 0.45);
}

html.bw-theme-dark .site-header,
html.bw-theme-dark .site-footer,
html.bw-theme-dark .post-card,
html.bw-theme-dark .side-section,
html.bw-theme-dark .archive-header,
html.bw-theme-dark .single-meta,
html.bw-theme-dark .posts,
html.bw-theme-dark .single-main {
  border-color: var(--bw-border);
}

html.bw-theme-dark .brand h1,
html.bw-theme-dark .brand p,
html.bw-theme-dark .main-nav a,
html.bw-theme-dark .post-title,
html.bw-theme-dark .side-title,
html.bw-theme-dark .podcast-name,
html.bw-theme-dark .read-more,
html.bw-theme-dark .side-link,
html.bw-theme-dark .footer-links,
html.bw-theme-dark .footer-copy,
html.bw-theme-dark .archive-title,
html.bw-theme-dark .single-title {
  color: var(--bw-text);
}

html.bw-theme-dark .post-date,
html.bw-theme-dark .archive-kicker,
html.bw-theme-dark .podcast-date,
html.bw-theme-dark .podcast-duration,
html.bw-theme-dark .read-time,
html.bw-theme-dark .current-date {
  color: var(--bw-muted);
}

html.bw-theme-dark .post-excerpt,
html.bw-theme-dark .side-text,
html.bw-theme-dark .newsletter-text,
html.bw-theme-dark .single-content,
html.bw-theme-dark .page-content,
html.bw-theme-dark .archive-list li {
  color: #d6d6d6;
}

html.bw-theme-dark .podcast-card,
html.bw-theme-dark .newsletter-form input,
html.bw-theme-dark .search-field {
  background: var(--bw-soft);
  color: var(--bw-text);
  border-color: var(--bw-border);
}

html.bw-theme-dark .hamburger span,
html.bw-theme-dark .search-icon::after,
html.bw-theme-dark .newsletter-form button,
html.bw-theme-dark .search-submit {
  background: var(--bw-text);
}

html.bw-theme-dark .search-icon::before {
  border-color: var(--bw-text);
}

html.bw-theme-dark .newsletter-form button,
html.bw-theme-dark .search-submit {
  color: var(--bw-bg);
}

html.bw-reader-mode {
  --bw-bg: #efe4c8;
  --bw-surface: #f4ead2;
  --bw-card: #f2e7cf;
  --bw-text: #2d2418;
  --bw-muted: #6e5d49;
  --bw-border: #cdbd9f;
  --bw-accent: #3a2d1b;
  --bw-soft: #e7dbc0;
}

html.bw-reader-mode body,
html.bw-reader-mode .site-header,
html.bw-reader-mode .search-panel {
  background: var(--bw-bg);
  color: var(--bw-text);
}

html.bw-reader-mode .site-header,
html.bw-reader-mode .site-footer,
html.bw-reader-mode .post-card,
html.bw-reader-mode .side-section,
html.bw-reader-mode .archive-header,
html.bw-reader-mode .single-meta,
html.bw-reader-mode .posts,
html.bw-reader-mode .single-main {
  border-color: var(--bw-border);
}

html.bw-reader-mode .brand h1,
html.bw-reader-mode .brand p,
html.bw-reader-mode .main-nav a,
html.bw-reader-mode .post-title,
html.bw-reader-mode .side-title,
html.bw-reader-mode .podcast-name,
html.bw-reader-mode .read-more,
html.bw-reader-mode .side-link,
html.bw-reader-mode .footer-links,
html.bw-reader-mode .footer-copy,
html.bw-reader-mode .archive-title,
html.bw-reader-mode .single-title {
  color: var(--bw-text);
}

html.bw-reader-mode .post-date,
html.bw-reader-mode .archive-kicker,
html.bw-reader-mode .podcast-date,
html.bw-reader-mode .podcast-duration,
html.bw-reader-mode .read-time,
html.bw-reader-mode .current-date,
html.bw-reader-mode .share-feedback {
  color: var(--bw-muted);
}

html.bw-reader-mode .post-excerpt,
html.bw-reader-mode .side-text,
html.bw-reader-mode .newsletter-text,
html.bw-reader-mode .single-content,
html.bw-reader-mode .page-content,
html.bw-reader-mode .archive-list li {
  color: var(--bw-text);
}

html.bw-reader-mode .podcast-card,
html.bw-reader-mode .newsletter-form input,
html.bw-reader-mode .search-field,
html.bw-reader-mode .theme-controls button {
  background: var(--bw-card);
  color: var(--bw-text);
  border-color: var(--bw-border);
}

html.bw-reader-mode .placeholder,
html.bw-reader-mode .post-image {
  background-color: var(--bw-soft);
}

html.bw-reader-mode .hamburger span,
html.bw-reader-mode .search-icon::after,
html.bw-reader-mode .newsletter-form button,
html.bw-reader-mode .search-submit {
  background: var(--bw-accent);
}

html.bw-reader-mode .search-icon::before {
  border-color: var(--bw-accent);
}

html.bw-reader-mode .newsletter-form button,
html.bw-reader-mode .search-submit,
html.bw-reader-mode .theme-controls button.is-active,
html.bw-reader-mode .focus-mode-link.is-active {
  color: var(--bw-bg);
}

html.bw-reader-mode .search-overlay {
  background: rgba(239, 228, 200, 0.78);
}

html.bw-reader-mode .search-panel {
  background: var(--bw-surface);
}

html.bw-reader-mode .drawer-backdrop {
  background: rgba(239, 228, 200, 0.68);
}

html.bw-reader-mode .single-main {
  max-width: 820px;
}

html.bw-reader-mode .single-content,
html.bw-reader-mode .page-content {
  font-size: 16px;
  line-height: 2.45;
}

.page-links {
  margin-top: 18px;
}

.post-page-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--bw-muted);
  font-size: 12px;
}

.post-page-links span {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid var(--bw-border);
}

.comments-area {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--bw-border);
}

.comments-title,
.comment-reply-title {
  margin-bottom: 16px;
}

.comment-list {
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}

.comment-list .comment {
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--bw-border);
}

.comment-list .children {
  list-style: none;
  margin: 16px 0 0;
  padding-inline-start: 20px;
}

.comment-meta {
  margin-bottom: 8px;
  color: var(--bw-muted);
  font-size: 12px;
}

.comment-content p:last-child {
  margin-bottom: 0;
}

.comment-respond .comment-form {
  display: grid;
  gap: 12px;
}

.comment-respond .comment-form-comment textarea,
.comment-respond .comment-form-author input,
.comment-respond .comment-form-email input,
.comment-respond .comment-form-url input {
  width: 100%;
}

html.bw-focus-mode .single-layout {
  grid-template-columns: minmax(0, 1fr);
}

html.bw-focus-mode .single-layout .sidebar,
html.bw-focus-mode .site-footer {
  display: none;
}

html.bw-focus-mode .single-main {
  grid-column: 1;
  border-right: 0;
  padding-right: 0;
  max-width: 820px;
  margin: 0 auto;
}

html.bw-focus-mode .site-header {
  position: static;
  top: auto;
}

html.bw-focus-mode body.admin-bar .site-header {
  top: auto;
}

@media (min-width: 861px) {
  .hamburger {
    display: none;
  }
}

@media (max-width: 860px) {
  .site-header {
    height: 72px;
  }

  .brand h1,
  .brand-title {
    font-size: 28px;
  }

  .brand p {
    font-size: 11px;
    margin-top: 6px;
  }

  .header-left,
  .header-right {
    gap: 22px;
  }

  .header-controls {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .single-meta .focus-mode-link {
    display: inline-flex;
    align-items: center;
  }

  .main-layout,
  .single-layout {
    margin-top: 24px;
  }

  .sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: min(86vw, 360px);
    margin-bottom: 0;
    padding: 24px 20px;
    background: var(--bw-bg);
    color: var(--bw-text);
    overflow-y: auto;
    z-index: 1300;
    transform: translateX(105%);
    transition: transform 0.25s ease;
    border-left: 1px solid var(--bw-border);
  }

  body.bw-no-sidebar .sidebar.bw-sidebar-empty {
    display: block;
  }

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

  html[dir="ltr"] .sidebar {
    right: auto;
    left: 0;
    transform: translateX(-105%);
    border-left: 0;
    border-right: 1px solid var(--bw-border);
  }

  .sidebar.is-open,
  html[dir="ltr"] .sidebar.is-open {
    transform: translateX(0);
  }

  html.bw-focus-mode .single-layout .sidebar {
    display: block;
  }

  .drawer-header {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
  }

  .drawer-nav {
    display: grid;
    gap: 14px;
    padding-bottom: 26px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--bw-border);
  }

  .drawer-nav a {
    font-size: 14px;
    font-weight: 700;
  }

  .drawer-search {
    display: block;
    padding-bottom: 26px;
    margin-bottom: 26px;
    border-bottom: 1px solid var(--bw-border);
  }

  .theme-controls {
    display: flex;
  }

  .drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1250;
    background: rgba(255, 255, 255, 0.68);
  }

  html.bw-theme-dark .drawer-backdrop {
    background: rgba(0, 0, 0, 0.62);
  }

  body.bw-drawer-open .drawer-backdrop {
    display: block;
  }

  body.bw-drawer-open,
  body.bw-overlay-open {
    overflow: hidden;
  }

  body.bw-audio-sticky-active {
    padding-bottom: 96px;
  }

  .podcast-player.is-mobile-sticky {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: calc(12px + env(safe-area-inset-bottom));
    z-index: 1200;
    background: var(--bw-card);
    border: 1px solid var(--bw-border);
    border-radius: 6px;
    padding: 10px 12px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.18);
  }

  .podcast-player.is-mobile-sticky .player-row {
    margin-top: 0;
  }

  .podcast-player.is-mobile-sticky .waveform {
    height: 24px;
  }

  .podcast-player.is-mobile-sticky .podcast-duration {
    margin-top: 5px;
  }
}

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