﻿/*
Theme Name: Pro Market CN Multilingual
Theme URI: https://example.com/pro-market-cn
Author: 大都督
Author URI: https://example.com
Description: 多语言独立 WordPress 主题，内置中文、台湾繁体、英语、土耳其语、日语、西班牙语、葡萄牙语、阿拉伯语，并优先适配 Polylang。
Version: 2.2.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: pro-market-cn
Tags: blog, custom-menu, featured-images, translation-ready
*/
:root {
  --pm-green: #1dbf73;
  --pm-green-dark: #128c55;
  --pm-ink: #222325;
  --pm-body: #404145;
  --pm-muted: #74767e;
  --pm-line: #e4e5e7;
  --pm-bg: #ffffff;
  --pm-soft: #f7f7f7;
  --pm-deep: #053d2f;
  --pm-max: 1400px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--pm-body);
  background: var(--pm-bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

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

a:hover {
  color: var(--pm-green-dark);
}

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

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

.pm-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--pm-line);
}

.pm-header-main {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: 72px;
}

.pm-logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--pm-ink);
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0;
}

.pm-logo img {
  display: block;
  max-height: 42px;
  width: auto;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
}

.pm-logo span {
  color: var(--pm-green);
}

.pm-nav {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}

.pm-menu,
.pm-category-menu,
.pm-footer-menu {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pm-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.pm-menu a {
  display: block;
  color: #404145;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.pm-header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  flex: 0 0 auto;
}

.pm-header-actions a {
  color: #404145;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.pm-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 18px;
  color: var(--pm-green) !important;
  border: 1px solid var(--pm-green);
  border-radius: 4px;
}

.pm-btn-outline:hover {
  color: #fff !important;
  background: var(--pm-green);
}

.pm-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  margin-left: auto;
  color: var(--pm-ink);
  background: transparent;
  border: 0;
}

.pm-menu-toggle span,
.pm-menu-toggle span::before,
.pm-menu-toggle span::after {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: currentColor;
  content: "";
}

.pm-menu-toggle span::before {
  transform: translateY(-7px);
}

.pm-menu-toggle span::after {
  transform: translateY(5px);
}

.pm-category-bar {
  border-top: 1px solid var(--pm-line);
}

.pm-category-menu {
  display: flex;
  gap: 34px;
  overflow-x: auto;
  scrollbar-width: none;
}

.pm-category-menu::-webkit-scrollbar {
  display: none;
}

.pm-category-menu a {
  display: block;
  padding: 12px 0;
  color: #62646a;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.pm-category-menu a.is-active {
  color: var(--pm-green-dark);
  box-shadow: inset 0 -3px 0 var(--pm-green);
}

.pm-category-more {
  position: relative;
  flex: 0 0 auto;
}

.pm-category-more button {
  display: block;
  padding: 8px 4px 12px;
  color: #62646a;
  font: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.pm-category-more ul {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  z-index: 30;
  display: none;
  min-width: 210px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .12);
}

.pm-category-more:hover ul,
.pm-category-more.is-open ul {
  display: block;
}

.pm-category-more ul a {
  padding: 10px 12px;
  color: var(--pm-body);
  border-radius: 4px;
}

.pm-category-more ul a:hover {
  color: var(--pm-ink);
  background: var(--pm-soft);
}

.pm-mobile-panel {
  display: none;
  padding: 12px 0 22px;
  border-top: 1px solid var(--pm-line);
}

.pm-mobile-panel .pm-menu {
  display: block;
}

.pm-mobile-panel a {
  display: block;
  padding: 12px 0;
  border-bottom: 1px solid var(--pm-line);
}

.pm-mobile-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.pm-hero {
  min-height: var(--pm-hero-height, 430px);
  color: #fff;
  background-position: center;
  background-size: cover;
}

.pm-hero-inner {
  display: grid;
  align-items: center;
  min-height: var(--pm-hero-height, 430px);
  max-width: 760px;
}

.pm-hero h1 {
  margin: 0 0 22px;
  font-size: clamp(34px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: 0;
}

.pm-hero p {
  max-width: 620px;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, .9);
  font-size: 20px;
}

.pm-search {
  display: flex;
  width: min(100%, 680px);
  overflow: hidden;
  background: #fff;
  border-radius: 4px;
}

.pm-search input {
  flex: 1 1 auto;
  min-width: 0;
  height: 56px;
  padding: 0 20px;
  color: var(--pm-ink);
  font-size: 16px;
  border: 0;
  outline: 0;
}

.pm-search button,
.pm-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 24px;
  color: #fff;
  font-weight: 700;
  background: var(--pm-green);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.pm-search button {
  min-height: 56px;
  border-radius: 0;
}

.pm-trending {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 22px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
}

.pm-trending a {
  padding: 4px 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .68);
  border-radius: 999px;
}

.pm-section {
  padding: 72px 0;
}

.pm-section-soft {
  background: var(--pm-soft);
}

.pm-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

.pm-section-title {
  margin: 0;
  color: var(--pm-ink);
  font-size: 32px;
  line-height: 1.25;
}

.pm-section-desc {
  max-width: 640px;
  margin: 10px 0 0;
  color: var(--pm-muted);
}

.pm-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 24px;
}

.pm-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-card-media {
  display: block;
  aspect-ratio: 4 / 3;
  background: #d8d8d8;
}

.pm-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-card-body {
  padding: 18px;
}

.pm-card-title {
  margin: 0 0 8px;
  color: var(--pm-ink);
  font-size: 18px;
  line-height: 1.4;
}

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

.pm-card-meta {
  margin-top: 14px;
  color: var(--pm-muted);
  font-size: 13px;
}

.pm-category-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.pm-category-card {
  display: block;
  min-height: 130px;
  padding: 22px;
  color: #fff;
  background: var(--pm-deep);
  border-radius: 8px;
  background-size: cover;
  background-position: center;
}

.pm-category-card em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  margin-bottom: 14px;
  color: var(--pm-ink);
  font-style: normal;
  font-size: 19px;
  font-weight: 800;
  background: rgba(255, 255, 255, .86);
  border-radius: 8px;
}

.pm-category-card strong {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
}

.pm-category-card span {
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
}

.pm-category-card-image {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.pm-content-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 48px;
  padding: 56px 0;
}

.pm-main article + article {
  margin-top: 28px;
}

.pm-post-header {
  margin-bottom: 28px;
}

.pm-post-title {
  margin: 0 0 12px;
  color: var(--pm-ink);
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.15;
}

.pm-entry {
  color: var(--pm-body);
}

.pm-entry h2,
.pm-entry h3 {
  color: var(--pm-ink);
  line-height: 1.3;
}

.pm-entry a {
  color: var(--pm-green-dark);
  text-decoration: underline;
}

.pm-archive-hero {
  padding: 34px 0 30px;
  color: var(--pm-ink);
  background: var(--pm-soft);
  border-bottom: 1px solid var(--pm-line);
}

.pm-archive-hero h1 {
  max-width: 780px;
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 44px);
  line-height: 1.16;
  letter-spacing: 0;
}

.pm-archive-hero .pm-kicker {
  margin-bottom: 10px;
}

.pm-archive-desc {
  max-width: 700px;
  color: var(--pm-muted);
  font-size: 16px;
}

.pm-archive-desc p {
  margin: 0;
}

.pm-empty-state {
  max-width: 680px;
  margin: 0 auto;
  padding: 44px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-empty-state h2 {
  margin: 0 0 10px;
  color: var(--pm-ink);
  font-size: 28px;
}

.pm-empty-state p {
  margin: 0 0 22px;
  color: var(--pm-muted);
}

.pm-single-hero {
  padding: 34px 0 24px;
  color: var(--pm-ink);
  background: #fff;
  border-bottom: 1px solid var(--pm-line);
}

.pm-single-hero-inner {
  max-width: 1040px;
}

.pm-single-hero h1 {
  max-width: 920px;
  margin: 12px 0 14px;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.12;
  letter-spacing: 0;
}

.pm-single-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pm-single-cats a {
  display: inline-flex;
  padding: 6px 12px;
  color: var(--pm-green-dark);
  font-size: 14px;
  font-weight: 800;
  background: rgba(29, 191, 115, .09);
  border: 1px solid rgba(29, 191, 115, .18);
  border-radius: 999px;
}

.pm-single-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  color: var(--pm-muted);
  font-size: 15px;
}

.pm-single-cover {
  overflow: hidden;
  margin: 0 0 28px;
  aspect-ratio: 16 / 8;
  background: #ddd;
  border-radius: 8px;
  border: 1px solid var(--pm-line);
}

.pm-single-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pm-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) 360px;
  gap: 42px;
  align-items: start;
  padding-top: 34px;
  padding-bottom: 64px;
}

.pm-single-content {
  min-width: 0;
}

.pm-single .pm-entry {
  color: #34353a;
  font-size: 17px;
  line-height: 1.82;
  padding: 0 0 12px;
}

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

.pm-single .pm-entry img {
  border-radius: 8px;
}

.pm-author-box {
  display: flex;
  gap: 16px;
  margin-top: 42px;
  padding: 22px;
  background: var(--pm-soft);
  border-radius: 8px;
}

.pm-profile-aside {
  position: sticky;
  top: 104px;
  display: grid;
  gap: 18px;
}

.pm-profile-card {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-profile-card h2 {
  margin: 0 0 16px;
  color: var(--pm-ink);
  font-size: 18px;
  line-height: 1.35;
}

.pm-profile-card p {
  margin: 14px 0 18px;
  color: var(--pm-muted);
  font-size: 15px;
  line-height: 1.65;
}

.pm-profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.pm-profile-head img {
  border-radius: 50%;
}

.pm-profile-head strong {
  display: block;
  color: var(--pm-ink);
  font-size: 18px;
}

.pm-profile-head span {
  color: var(--pm-muted);
  font-size: 14px;
}

.pm-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}

.pm-facts div {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--pm-line);
}

.pm-facts div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.pm-facts dt {
  margin: 0 0 4px;
  color: var(--pm-muted);
  font-size: 13px;
}

.pm-facts dd {
  margin: 0;
  color: var(--pm-ink);
  font-weight: 700;
}

.pm-facts a {
  color: var(--pm-green-dark);
}

.pm-profile-card .pm-search {
  display: grid;
  width: 100%;
  border: 1px solid var(--pm-line);
}

.pm-profile-card .pm-search input {
  height: 46px;
}

.pm-profile-card .pm-search button {
  min-height: 42px;
}

.pm-author-box img {
  border-radius: 50%;
}

.pm-author-box strong {
  display: block;
  color: var(--pm-ink);
  font-size: 17px;
}

.pm-author-box p {
  margin: 4px 0 0;
  color: var(--pm-muted);
}

.pm-single-nav {
  margin-top: 30px;
}

.pm-single-nav .nav-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.pm-single-nav a {
  display: block;
  min-height: 96px;
  padding: 18px;
  color: var(--pm-ink);
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-single-nav span {
  display: block;
  margin-bottom: 8px;
  color: var(--pm-muted);
  font-size: 13px;
  font-weight: 800;
}

.pm-sidebar .widget,
.pm-widget {
  margin-bottom: 24px;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-sidebar .widget-title {
  margin: 0 0 14px;
  color: var(--pm-ink);
  font-size: 18px;
}

.pm-pagination {
  margin-top: 36px;
}

.pm-pagination .nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.pm-pagination a,
.pm-pagination span {
  padding: 8px 12px;
  border: 1px solid var(--pm-line);
  border-radius: 4px;
}

.pm-footer {
  border-top: 1px solid var(--pm-line);
  background: #fff;
}

.pm-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pm-auth-modal.is-open {
  display: flex;
}

.pm-auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(34, 35, 37, .52);
}

.pm-auth-dialog {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.pm-auth-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 34px;
  height: 34px;
  color: var(--pm-muted);
  font-size: 28px;
  line-height: 1;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.pm-auth-dialog h2 {
  margin: 0 0 8px;
  color: var(--pm-ink);
  font-size: 28px;
  line-height: 1.2;
}

.pm-auth-dialog p {
  margin: 0 0 20px;
  color: var(--pm-muted);
}

.pm-auth-dialog .login-username,
.pm-auth-dialog .login-password {
  margin: 0 0 14px;
}

.pm-auth-dialog label {
  display: block;
  margin-bottom: 6px;
  color: var(--pm-ink);
  font-size: 14px;
  font-weight: 700;
}

.pm-auth-dialog input[type="text"],
.pm-auth-dialog input[type="password"] {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--pm-line);
  border-radius: 4px;
}

.pm-auth-dialog .login-remember {
  color: var(--pm-muted);
  font-size: 14px;
}

.pm-auth-dialog .button-primary {
  width: 100%;
  min-height: 44px;
  color: #fff;
  font-weight: 800;
  background: var(--pm-green);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.pm-auth-links {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 16px;
  font-size: 14px;
}

.pm-auth-links a {
  color: var(--pm-green-dark);
}

.pm-auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 36px;
  background:
    linear-gradient(120deg, rgba(5, 61, 47, .92), rgba(5, 61, 47, .68)),
    url("https://images.unsplash.com/photo-1556761175-4b46a572b786?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.pm-auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 440px;
  width: min(100%, 980px);
  overflow: hidden;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .26);
}

.pm-auth-art {
  min-height: 560px;
  padding: 46px;
  color: #fff;
  background:
    linear-gradient(180deg, rgba(5, 61, 47, .18), rgba(5, 61, 47, .74)),
    url("https://images.unsplash.com/photo-1551434678-e076c223a692?auto=format&fit=crop&w=1200&q=80") center/cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.pm-auth-logo {
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}

.pm-auth-logo img {
  max-height: 42px;
  width: auto;
}

.pm-auth-logo span {
  color: var(--pm-green);
}

.pm-auth-art h1 {
  max-width: 420px;
  margin: auto 0 14px;
  font-size: 42px;
  line-height: 1.12;
  letter-spacing: 0;
}

.pm-auth-art p {
  max-width: 420px;
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: 17px;
}

.pm-auth-panel {
  padding: 46px;
}

.pm-auth-panel h2 {
  margin: 0 0 8px;
  color: var(--pm-ink);
  font-size: 30px;
  line-height: 1.2;
}

.pm-auth-panel > p {
  margin: 0 0 24px;
  color: var(--pm-muted);
}

.pm-auth-panel form {
  display: grid;
  gap: 16px;
}

.pm-auth-panel label {
  display: grid;
  gap: 7px;
  color: var(--pm-ink);
  font-size: 14px;
  font-weight: 800;
}

.pm-auth-panel input[type="text"],
.pm-auth-panel input[type="email"],
.pm-auth-panel input[type="password"] {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: var(--pm-ink);
  border: 1px solid var(--pm-line);
  border-radius: 4px;
}

.pm-auth-remember {
  display: flex !important;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px !important;
  color: var(--pm-muted) !important;
  font-weight: 600 !important;
}

.pm-auth-panel button {
  min-height: 46px;
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  background: var(--pm-green);
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}

.pm-auth-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  color: #8a3b00;
  background: #fff3e5;
  border: 1px solid #ffd8ad;
  border-radius: 4px;
}

.pm-auth-success {
  color: #146c43;
  background: #e9f8ef;
  border-color: #bfe8ce;
}

.pm-auth-switch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  color: var(--pm-muted);
  font-size: 14px;
}

.pm-auth-switch a {
  color: var(--pm-green-dark);
  font-weight: 800;
}

.pm-wechat-login {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 16px;
  color: #178b49;
  font-weight: 900;
  border: 1px solid rgba(29, 191, 115, .36);
  border-radius: 4px;
}

.pm-slide-captcha {
  position: relative;
  height: 44px;
  overflow: hidden;
  color: var(--pm-muted);
  font-size: 14px;
  text-align: center;
  background: var(--pm-soft);
  border: 1px solid var(--pm-line);
  border-radius: 4px;
  user-select: none;
}

.pm-slide-track {
  display: block;
  line-height: 42px;
}

.pm-slide-button {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 38px;
  height: 36px;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .08);
  cursor: grab;
}

.pm-slide-button::after {
  content: ">";
  color: var(--pm-green-dark);
  font-weight: 900;
}

.pm-slide-captcha.is-passed {
  color: var(--pm-green-dark);
  background: rgba(29, 191, 115, .1);
  border-color: rgba(29, 191, 115, .35);
}

.pm-footer-top {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  padding: 64px 0 44px;
}

.pm-footer-title {
  margin: 0 0 18px;
  color: var(--pm-ink);
  font-size: 16px;
  font-weight: 800;
}

.pm-footer-menu li + li {
  margin-top: 12px;
}

.pm-footer-menu a {
  color: var(--pm-muted);
  font-size: 15px;
}

.pm-footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0;
  color: var(--pm-muted);
  border-top: 1px solid var(--pm-line);
}

.pm-footer-brand {
  color: var(--pm-ink);
  font-size: 27px;
  font-weight: 800;
}

.pm-footer-meta {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.pm-language {
  position: relative;
}

.pm-language-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  color: var(--pm-muted);
  font: inherit;
  line-height: 1;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 4px;
  cursor: pointer;
}

.pm-language-toggle::after {
  width: 7px;
  height: 7px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  content: "";
}

.pm-language-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 20;
  display: none;
  min-width: 160px;
  margin: 0;
  padding: 8px;
  list-style: none;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .12);
}

.pm-header-actions .pm-language-menu {
  top: calc(100% + 8px);
  right: 0;
  bottom: auto;
}

.pm-language.is-open .pm-language-menu,
.pm-language:hover .pm-language-menu {
  display: block;
}

.pm-language-menu a {
  display: block;
  padding: 9px 10px;
  color: var(--pm-body);
  border-radius: 4px;
}

.pm-language-menu a:hover {
  color: var(--pm-ink);
  background: var(--pm-soft);
}

.pm-tax-hero {
  padding: 72px 0;
  color: #fff;
  background:
    linear-gradient(90deg, rgba(5, 61, 47, .96), rgba(5, 61, 47, .72)),
    url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.pm-tax-hero-inner {
  max-width: 760px;
}

.pm-kicker {
  margin: 0 0 12px;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  font-weight: 800;
}

.pm-tax-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(36px, 5vw, 58px);
  line-height: 1.12;
  letter-spacing: 0;
}

.pm-tax-hero p {
  max-width: 640px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, .88);
  font-size: 18px;
}

.pm-all-categories {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.pm-all-category-card {
  display: block;
  min-height: 210px;
  padding: 26px;
  color: var(--pm-body);
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.pm-all-category-card:hover {
  color: var(--pm-body);
  border-color: rgba(29, 191, 115, .42);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .08);
  transform: translateY(-3px);
}

.pm-all-category-count {
  display: inline-flex;
  margin-bottom: 28px;
  padding: 5px 10px;
  color: var(--pm-green-dark);
  font-size: 13px;
  font-weight: 800;
  background: rgba(29, 191, 115, .1);
  border-radius: 999px;
}

.pm-all-category-card h2 {
  margin: 0 0 10px;
  color: var(--pm-ink);
  font-size: 23px;
  line-height: 1.25;
}

.pm-all-category-card p {
  margin: 0;
  color: var(--pm-muted);
  font-size: 15px;
}

.pm-comments {
  margin-top: 34px;
  padding: 30px;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.pm-comments-head h2 {
  margin: 4px 0 0;
  font-size: 24px;
}

.pm-comments-head a {
  color: var(--pm-green-dark);
  font-weight: 800;
}

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

.pm-comment-list .comment {
  margin: 0 0 16px;
  padding: 18px;
  background: var(--pm-soft);
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-comment-list .children {
  margin-top: 14px;
  padding-left: 24px;
  list-style: none;
}

.pm-comment-form {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.pm-comment-form p {
  margin: 0;
}

.pm-comment-form label {
  display: block;
  margin-bottom: 7px;
  color: var(--pm-ink);
  font-weight: 800;
}

.pm-comment-form input:not([type="checkbox"]),
.pm-comment-form textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--pm-ink);
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 6px;
}

.pm-comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

.pm-comment-form .submit input,
.pm-comment-form button,
.pm-comment-form input[type="submit"] {
  width: auto;
  padding: 12px 20px;
  color: #fff;
  font-weight: 900;
  background: var(--pm-green);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.pm-email-code-row span {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.pm-email-code-row button {
  min-width: 112px;
  padding: 0 14px;
  color: #fff;
  font-weight: 800;
  background: var(--pm-ink);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.pm-email-code-row button:disabled {
  cursor: not-allowed;
  opacity: .72;
}

.pm-email-code-note {
  min-height: 20px;
  color: var(--pm-green-dark);
  font-size: 13px;
  font-weight: 700;
}

.pm-float-actions {
  position: fixed;
  right: 22px;
  bottom: 28px;
  z-index: 80;
  display: grid;
  gap: 10px;
}

.pm-float-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
  padding: 0 14px;
  color: var(--pm-ink);
  font-weight: 900;
  line-height: 1;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
  cursor: pointer;
}

.pm-subscribe-btn {
  gap: 6px;
  color: var(--pm-subscribe-color, #fff);
  background: var(--pm-subscribe-bg, var(--pm-green));
  border-color: var(--pm-subscribe-bg, var(--pm-green));
  writing-mode: vertical-rl;
  text-decoration: none;
}

.pm-subscribe-icon {
  font-size: 16px;
  line-height: 1;
}

.pm-ad-slot {
  overflow: hidden;
  margin: 0 0 24px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-ad-slot img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.pm-single-hero-inner.has-hero-ad {
  display: grid;
  grid-template-columns: minmax(180px, 280px) minmax(0, 1fr);
  gap: 32px;
  align-items: center;
}

.pm-single-hero-ad .pm-ad-slot {
  margin: 0;
  min-height: 170px;
}

.pm-single-search {
  margin-bottom: 24px;
  padding: 18px;
  background: var(--pm-soft);
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-avatar-page {
  max-width: 620px;
  margin: 0 auto;
  padding: 34px;
  background: #fff;
  border: 1px solid var(--pm-line);
  border-radius: 8px;
}

.pm-avatar-page h1 {
  margin: 0 0 10px;
}

.pm-avatar-preview {
  margin: 22px 0;
}

.pm-avatar-preview img,
.pm-user-avatar {
  border-radius: 999px;
}

.pm-avatar-form {
  display: grid;
  gap: 16px;
}

.pm-rtl {
  direction: rtl;
}

.pm-rtl .pm-language-menu {
  right: auto;
  left: 0;
}

.pm-rtl .pm-float-actions {
  right: auto;
  left: 22px;
}

@media (max-width: 1100px) {
  .pm-nav,
  .pm-header-actions,
  .pm-category-bar {
    display: none;
  }

  .pm-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  body.pm-menu-open .pm-mobile-panel {
    display: block;
  }

  .pm-mobile-categories .pm-category-menu {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    margin: 14px 0;
    overflow: visible;
  }

  .pm-mobile-categories .pm-category-menu a {
    padding: 10px 12px;
    background: var(--pm-soft);
    border-radius: 6px;
  }

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

  .pm-category-grid,
  .pm-footer-top,
  .pm-all-categories {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pm-content-wrap {
    grid-template-columns: 1fr;
  }

  .pm-single-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .pm-profile-aside {
    position: static;
    order: 2;
  }
}

@media (max-width: 680px) {
  .pm-container {
    width: min(100% - 32px, var(--pm-max));
  }

  .pm-header-main {
    min-height: 64px;
  }

  .pm-logo {
    font-size: 25px;
  }

  .pm-hero,
  .pm-hero-inner {
    min-height: min(var(--pm-hero-height, 320px), 340px);
  }

  .pm-search {
    display: grid;
  }

  .pm-search button {
    min-height: 48px;
  }

  .pm-section {
    padding: 48px 0;
  }

  .pm-section-head,
  .pm-footer-bottom {
    align-items: flex-start;
    flex-direction: column;
  }

  .pm-grid,
  .pm-category-grid {
    grid-template-columns: 1fr;
  }

  .pm-footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 22px;
    padding: 44px 0 30px;
  }

  .pm-footer-meta {
    justify-content: flex-start;
  }

  .pm-all-categories {
    grid-template-columns: 1fr;
  }

  .pm-language-menu {
    right: auto;
    left: 0;
  }

  .pm-single-cover {
    aspect-ratio: 16 / 10;
  }

  .pm-archive-hero,
  .pm-single-hero {
    padding: 24px 0 20px;
  }

  .pm-single-layout {
    padding-top: 24px;
  }

  .pm-single-hero-inner.has-hero-ad {
    grid-template-columns: 1fr;
  }

  .pm-single-hero-ad .pm-ad-slot {
    min-height: auto;
  }

  .pm-archive-banner .pm-hero-inner {
    min-height: 240px;
  }

  .pm-single-search {
    padding: 14px;
  }

  .pm-single-nav .nav-links {
    grid-template-columns: 1fr;
  }

  .pm-auth-screen {
    padding: 18px;
  }

  .pm-auth-shell {
    grid-template-columns: 1fr;
  }

  .pm-auth-art {
    display: none;
  }

  .pm-auth-panel {
    padding: 30px 22px;
  }

  .pm-comments {
    padding: 22px 18px;
  }

  .pm-comments-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .pm-comment-list .children {
    padding-left: 12px;
  }

  .pm-email-code-row span {
    grid-template-columns: 1fr;
  }

  .pm-email-code-row button {
    min-height: 44px;
  }

  .pm-float-actions {
    right: 14px;
    bottom: 16px;
  }

  .pm-float-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 0 11px;
    font-size: 13px;
  }
}


