/*
Theme Name: iBazaryabi Journal
Theme URI: https://www.ibazaryabi.com/
Author: Tarh
Description: A responsive RTL blog theme for iBazaryabi with rich article typography, archive pages, text ads, and light/dark mode.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: ibazaryabi-journal
*/

@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("assets/fonts/Vazirmatn-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-soft: #f0f4f2;
  --surface-tint: #e9f4ef;
  --text: #17221f;
  --muted: #6c7975;
  --line: #dde6e2;
  --brand: #159675;
  --brand-strong: #0a6f57;
  --accent: #d4a02f;
  --ink: #101917;
  --code-bg: #101a17;
  --code-text: #dcfff4;
  --shadow: 0 10px 28px rgba(21, 44, 38, 0.07);
  --shadow-lift: 0 18px 46px rgba(21, 44, 38, 0.12);
  --radius: 8px;
  --content: 760px;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0e1413;
  --surface: #141d1a;
  --surface-soft: #1b2925;
  --surface-tint: #182d27;
  --text: #eef7f4;
  --muted: #9db0aa;
  --line: #263631;
  --brand: #45c7a3;
  --brand-strong: #76dabf;
  --accent: #f6c35d;
  --code-bg: #07100e;
  --code-text: #c9fff1;
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.26);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  direction: rtl;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface-tint) 56%, transparent), transparent 260px),
    var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.9;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a {
  color: var(--brand-strong);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

a:hover,
a:focus-visible {
  color: var(--accent);
}

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

.wrap {
  width: min(1160px, calc(100% - 32px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  top: -48px;
  right: 16px;
  z-index: 1000;
  background: var(--brand);
  color: #fff;
  padding: 8px 12px;
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 16px;
}

.top-strip {
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  background: var(--ink);
  color: var(--muted);
  font-size: 13px;
}

.top-strip a,
.top-strip__inner {
  color: #d8e5e1;
}

.top-strip__inner {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.top-strip__inner > span:last-child {
  direction: ltr;
  white-space: nowrap;
  color: #cbd9d5;
  font-size: 12px;
}

.ticker {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ticker__label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #8fe5c9;
  font-weight: 700;
  white-space: nowrap;
}

.ticker__label::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: -5px 0 0 var(--brand);
}

.ticker__links {
  display: flex;
  gap: 14px;
  overflow: hidden;
  white-space: nowrap;
}

.ticker__links a {
  position: relative;
  color: #d8e5e1;
}

.ticker__links a + a {
  padding-right: 14px;
}

.ticker__links a + a::before {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 1px;
  height: 14px;
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-50%);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.site-header__inner {
  min-height: 88px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 22px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.site-logo,
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 7px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 75%, transparent);
  border-radius: var(--radius);
  background: #fff;
}

.site-logo--mark {
  gap: 8px;
  min-width: 152px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 12%, #fff), #fff);
  color: var(--text);
}

.site-logo__symbol {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), #3b6fe8);
  color: #fff;
  direction: ltr;
  font-family: Arial, sans-serif;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.site-logo__text {
  color: #27306f;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0;
}

html[data-theme="dark"] .site-logo--mark {
  background: #f8fbfa;
}

.site-logo img,
.custom-logo {
  width: 150px;
  height: auto;
}

.site-title {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 800;
}

.site-description {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex-wrap: wrap;
}

.main-navigation a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 11px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-ancestor > a,
.main-navigation .current_page_ancestor > a,
.main-navigation a.is-active {
  background: var(--surface-soft);
  color: var(--brand-strong);
}

.main-navigation .current-menu-item > a::after,
.main-navigation .current_page_item > a::after,
.main-navigation .current-menu-ancestor > a::after,
.main-navigation .current_page_ancestor > a::after,
.main-navigation a.is-active::after {
  content: "";
  position: absolute;
  right: 11px;
  left: 11px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.icon-button {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

.icon-button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1em;
  height: 1em;
  line-height: 1;
  transform: translateY(-1px);
}

.icon-button:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.mobile-menu-toggle {
  display: none;
}

.hero {
  padding: 34px 0 18px;
}

.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 24px;
  align-items: stretch;
}

.hero-card {
  min-height: 300px;
  padding: clamp(22px, 4vw, 44px);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface), var(--surface-soft));
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border: 1px solid var(--line);
}

.eyebrow,
.post-category {
  color: var(--brand-strong);
  font-size: 13px;
  font-weight: 700;
}

.hero-card h1 {
  margin: 12px 0 14px;
  max-width: 760px;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.35;
}

.hero-card p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-aside {
  display: grid;
  gap: 12px;
}

.mini-feature {
  padding: 16px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.mini-feature h2 {
  margin: 0 0 8px;
  font-size: 17px;
}

.mini-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.site-main {
  padding: 30px 0 56px;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 30px;
  align-items: start;
  direction: rtl;
}

.layout > section {
  grid-column: 1;
  min-width: 0;
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.post-card {
  min-width: 0;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  box-shadow: var(--shadow-lift);
}

.post-card__thumb {
  display: block;
  aspect-ratio: 16 / 9;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 20%, transparent), transparent 52%),
    linear-gradient(315deg, color-mix(in srgb, var(--accent) 22%, transparent), transparent 48%),
    var(--surface-soft);
  overflow: hidden;
}

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

.post-card__body {
  padding: 18px 20px 20px;
}

.post-card h2 {
  margin: 9px 0 10px;
  font-size: 20px;
  line-height: 1.68;
}

.post-card h2 a {
  color: var(--text);
}

.post-card h2 a:hover {
  color: var(--brand-strong);
}

.post-excerpt {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14.5px;
}

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

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  font-weight: 700;
}

.sidebar {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  gap: 18px;
  position: sticky;
  top: 118px;
}

.designer-ad {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lift);
}

.designer-ad a {
  min-height: 232px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  isolation: isolate;
  padding: 22px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, var(--line));
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 18% 16%, rgba(96, 139, 255, 0.36), transparent 28%),
    radial-gradient(circle at 84% 24%, rgba(69, 199, 163, 0.34), transparent 24%),
    linear-gradient(145deg, #101833, #0c1714 62%, #14261f);
  color: #fff;
}

.designer-ad a::before {
  content: "";
  position: absolute;
  inset: 14px;
  z-index: -1;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: calc(var(--radius) - 2px);
}

.designer-ad a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: -1;
  height: 46%;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.46), transparent);
}

.designer-ad__badge {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1;
  width: auto;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  background: rgba(8, 14, 28, 0.62);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  direction: ltr;
  text-align: left;
}

.designer-ad__badge span {
  display: inline;
  color: #fff;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.designer-ad__badge small {
  display: inline;
  margin-top: 0;
  color: #95f1d6;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.designer-ad__orbit {
  position: absolute;
  top: 18px;
  right: 22px;
  z-index: 0;
  width: 82px;
  height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.designer-ad__orbit span {
  position: absolute;
  border-radius: 50%;
}

.designer-ad__orbit span:first-child {
  width: 18px;
  height: 18px;
  top: 10px;
  right: 11px;
  background: linear-gradient(135deg, #6c8cff, #45c7a3);
}

.designer-ad__orbit span:last-child {
  width: 8px;
  height: 8px;
  left: 12px;
  bottom: 16px;
  background: var(--accent);
}

.designer-ad__kicker {
  color: #95f1d6;
  direction: ltr;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.designer-ad strong {
  max-width: 230px;
  color: #fff;
  font-size: 21px;
  line-height: 1.55;
}

.designer-ad small {
  max-width: 250px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  line-height: 1.8;
}

.designer-ad__cta {
  width: max-content;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.widget,
.sidebar .wp-block-group,
.comments-area,
.author-box,
.related-posts,
.text-ads {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.widget::before,
.sidebar .wp-block-group::before,
.text-ads::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}

.widget-title,
.widget h2,
.related-posts h2,
.comments-title,
.comment-reply-title {
  margin: 0 0 16px;
  font-size: 17px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.widget-title::before,
.widget h2::before,
.related-posts h2::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: -5px 5px 0 color-mix(in srgb, var(--accent) 75%, transparent);
}

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

.widget li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.thumb-list li + li {
  margin-top: 12px;
  padding-top: 12px;
}

.thumb-list a {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--text);
}

.thumb-list img,
.thumb-list a > span:first-child:empty {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, transparent), transparent 55%),
    var(--surface-soft);
}

.thumb-list strong {
  display: block;
  font-size: 13.5px;
  line-height: 1.65;
}

.thumb-list small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.archive-header,
.single-header,
.page-header {
  margin-bottom: 22px;
}

.home-heading {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-right: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.home-heading::after {
  content: "";
  position: absolute;
  inset-block: 0;
  inset-inline-end: auto;
  inset-inline-start: 0;
  width: 34%;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 9%, transparent), transparent);
  pointer-events: none;
}

.home-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.front-page-content {
  margin-bottom: 22px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}

.section-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.5;
}

.section-heading h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 8px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: -5px 5px 0 color-mix(in srgb, var(--accent) 75%, transparent);
  vertical-align: middle;
}

.featured-section {
  margin-bottom: 22px;
}

.featured-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.featured-tile {
  min-width: 0;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  min-height: 128px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-tint));
  color: var(--text);
  box-shadow: 0 8px 20px rgba(21, 44, 38, 0.05);
}

.featured-tile:hover {
  border-color: color-mix(in srgb, var(--brand) 36%, var(--line));
  color: var(--brand-strong);
}

.featured-tile__media {
  width: 108px;
  height: 92px;
  border-radius: var(--radius);
  overflow: hidden;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 22%, transparent), transparent 55%),
    var(--surface-soft);
}

.featured-tile__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.featured-tile strong {
  display: block;
  font-size: 15px;
  line-height: 1.75;
}

.featured-tile small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.breadcrumb {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.breadcrumb a {
  color: var(--muted);
}

.single-header h1,
.page-header h1,
.archive-header h1 {
  max-width: 920px;
  margin: 0 0 10px;
  font-size: clamp(22px, 2.5vw, 30px);
  line-height: 1.45;
}

.entry-shell {
  max-width: var(--content);
}

.entry-featured {
  margin-bottom: 22px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.entry-content {
  padding: clamp(20px, 4vw, 34px);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  overflow-wrap: break-word;
  word-break: normal;
}

.entry-content > *:first-child {
  margin-top: 0;
}

.entry-content > *:last-child {
  margin-bottom: 0;
}

.entry-content p {
  margin: 0 0 1.25em;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  scroll-margin-top: 110px;
  line-height: 1.55;
}

.entry-content h2 {
  margin: 2.2em 0 0.75em;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 28px;
}

.entry-content h3 {
  margin: 1.9em 0 0.65em;
  font-size: 23px;
}

.entry-content h4 {
  margin: 1.6em 0 0.55em;
  color: var(--brand-strong);
  font-size: 18px;
}

.entry-content a {
  border-bottom: 1px solid color-mix(in srgb, var(--brand) 45%, transparent);
  font-weight: 700;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.entry-content ul,
.entry-content ol {
  margin: 1.2em 0;
  padding: 0 1.35em 0 0;
}

.entry-content li {
  margin: 0.55em 0;
  padding-right: 0.15em;
}

.entry-content ul li::marker {
  color: var(--brand);
}

.entry-content ol li::marker {
  color: var(--brand-strong);
  font-weight: 700;
}

.entry-content blockquote {
  margin: 1.7em 0;
  padding: 18px 22px;
  border-right: 4px solid var(--brand);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 18px;
}

.entry-content mark {
  padding: 0.08em 0.28em;
  border-radius: 5px;
  background: color-mix(in srgb, var(--accent) 34%, transparent);
  color: inherit;
}

.entry-content code,
.entry-content kbd {
  max-width: 100%;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--brand-strong);
  padding: 0.1em 0.38em;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.9em;
  direction: ltr;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.entry-content pre {
  margin: 1.7em 0;
  padding: 18px;
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  border-radius: var(--radius);
  background: var(--code-bg);
  color: var(--code-text);
  direction: ltr;
  text-align: left;
}

.entry-content pre code {
  padding: 0;
  background: transparent;
  color: inherit;
  white-space: inherit;
}

.entry-content table {
  width: 100%;
  margin: 1.6em 0;
  border-collapse: collapse;
  border-radius: var(--radius);
  font-size: 14px;
}

.entry-content > table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  white-space: nowrap;
}

.entry-content .wp-block-table {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.entry-content .wp-block-table table {
  min-width: 640px;
}

.entry-content th,
.entry-content td {
  border: 1px solid var(--line);
  padding: 11px 12px;
  text-align: right;
  vertical-align: top;
}

.entry-content th {
  background: var(--surface-soft);
  color: var(--text);
}

.entry-content img,
.wp-caption {
  border-radius: var(--radius);
}

.entry-content .wp-caption-text {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.share-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0;
}

.share-box a,
.tag-links a,
.cat-links a,
.text-ad-link {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.share-box a:hover,
.tag-links a:hover,
.cat-links a:hover,
.text-ad-link:hover {
  border-color: var(--brand);
  color: var(--brand-strong);
}

.post-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.post-nav a {
  display: block;
  padding: 14px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.related-card {
  min-width: 0;
}

.related-card h3 {
  margin: 8px 0 0;
  font-size: 15px;
  line-height: 1.6;
}

.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 26px;
}

.page-numbers,
.post-page-numbers {
  min-width: 38px;
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 5px 10px;
}

.page-numbers.current,
.post-page-numbers.current {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.search-form {
  display: flex;
  gap: 8px;
}

.search-field,
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  padding: 9px 12px;
  font: inherit;
}

.search-submit,
input[type="submit"],
button {
  min-height: 42px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

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

.footer-widgets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 34px 0 24px;
}

.text-ads {
  margin-bottom: 22px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 10%, transparent), transparent 45%),
    var(--surface);
}

.text-ads__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.site-info {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.site-info ul,
.legal-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.site-info a,
.legal-links a {
  color: var(--muted);
}

.site-info a:hover,
.legal-links a:hover {
  color: var(--brand-strong);
}

.legal-links {
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}

.designer-credit a {
  font-weight: 800;
}

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

@media (max-width: 980px) {
  .site-header__inner {
    display: flex;
    min-height: 74px;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px 12px;
  }

  .layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .layout > section,
  .sidebar {
    grid-column: auto;
    grid-row: auto;
  }

  .sidebar {
    position: static;
  }

  .main-navigation {
    display: none;
    width: 100%;
  }

  .main-navigation.is-open {
    display: block;
  }

  .main-navigation ul {
    align-items: stretch;
    justify-content: flex-start;
  }

  .main-navigation li,
  .main-navigation a {
    width: 100%;
  }

  .mobile-menu-toggle {
    display: inline-grid;
  }

  .site-header__inner {
    gap: 12px;
  }

  .site-branding {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 0;
  }

  .header-actions {
    flex: 0 0 auto;
    order: 2;
  }

  .site-branding {
    order: 1;
  }

  .main-navigation {
    order: 3;
    flex: 1 0 100%;
    min-width: 0;
  }

  .post-grid,
  .related-grid,
  .footer-widgets {
    grid-template-columns: 1fr;
  }

  .featured-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .wrap {
    width: 100%;
    padding-inline: 12px;
  }

  .site-info,
  .post-nav {
    flex-direction: column;
    display: flex;
    align-items: stretch;
  }

  .ticker__links {
    display: none;
  }

  .top-strip__inner {
    min-height: 34px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
  }

  .ticker {
    min-width: auto;
  }

  .ticker__label {
    font-size: 12px;
  }

  .top-strip__inner > span:last-child {
    font-size: 12px;
  }

  .site-main {
    padding-top: 18px;
  }

  .site-header__inner {
    padding-block: 8px;
  }

  .site-logo img,
  .custom-logo {
    width: 112px;
  }

  .site-logo--mark {
    min-width: auto;
    padding: 6px 8px;
  }

  .site-logo__symbol {
    width: 30px;
    height: 30px;
    font-size: 13px;
  }

  .site-logo__text {
    font-size: 15px;
  }

  .site-title,
  .site-description {
    display: none;
  }

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

  .featured-strip {
    grid-template-columns: 1fr;
  }

  .featured-tile {
    grid-template-columns: 92px minmax(0, 1fr);
    min-height: 112px;
  }

  .featured-tile__media {
    width: 92px;
    height: 84px;
  }

  .post-card__body {
    padding: 16px;
  }

  .post-card h2 {
    font-size: 18px;
  }

  .entry-content {
    padding: 18px;
  }

  .home-heading {
    padding: 15px 14px;
  }

  .home-heading::after {
    width: 52%;
  }

  .single-header h1,
  .page-header h1,
  .archive-header h1 {
    font-size: 21px;
  }
}
