/*
 * Themis v2 — Problems of Modern Law (modernlaw.uz)
 * Minimal black & white editorial system, unified with the landing design:
 * white canvas, Inter typography (300-600), black pill buttons, full-viewport
 * statue hero on the journal homepage. The statue's bronze is the only color.
 */

:root {
  --th-canvas: #FFFFFF;
  --th-card: #F5F5F6;          /* light gray surface (nav pills, cards) */
  --th-mist: #FAFAFA;
  --th-ink: #0A0A0A;
  --th-ink-2: #444444;
  --th-smoke: rgba(0, 0, 0, 0.55);
  --th-hairline: rgba(0, 0, 0, 0.12);
  --th-dark: #0A0A0A;          /* inverted blocks & footer */
  --th-ink-inv: #FFFFFF;
  --th-ink-inv-dim: rgba(255, 255, 255, 0.62);

  --th-radius-card: 14px;
  --th-radius-btn: 999px;      /* pills everywhere */
  --th-radius-tag: 999px;

  --th-font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --th-font-mono: 'JetBrains Mono', 'Menlo', monospace;

  --th-max: 80rem;
  --th-section-gap: 5.5rem;
}

/* ============ Base ============ */
html { background: var(--th-canvas); }
body {
  background: var(--th-canvas);
  color: var(--th-ink);
  font-family: var(--th-font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
.pkp_structure_page, .pkp_structure_main { background: transparent; }
.pkp_structure_main a { color: var(--th-ink); text-decoration-color: var(--th-hairline); }
.pkp_structure_main a:hover { opacity: 0.7; }
h1, h2, h3, h4 { font-family: var(--th-font-body); color: var(--th-ink); }

.themis-landing h1, .themis-landing h2, .themis-landing h3,
.themis-journal h1, .themis-journal h2, .themis-journal h3 {
  font-family: var(--th-font-body) !important;
  line-height: 1.1 !important;
}
h2.th-h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.6rem) !important;
  font-weight: 400; letter-spacing: -0.02em;
}

.th-meta {
  font-family: var(--th-font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--th-smoke);
}

/* Landing pages: full-bleed */
.pkp_page_index .pkp_structure_main,
.pkp_page_index .pkp_structure_content {
  border: none !important;
  max-width: none !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
.pkp_page_index .pkp_structure_sidebar { display: none; }
.pkp_page_index .pkp_structure_page { max-width: none; }
.pkp_structure_main::before, .pkp_structure_main::after { display: none !important; }

/* ============ Header — landing-style minimal bar ============ */
:root {
  --cf-head-bg: rgba(255, 255, 255, 0.86);
  --cf-head-border: transparent;
  --cf-ink: #0A0A0A;
  --cf-ink-dim: rgba(0, 0, 0, 0.62);
  --cf-accent: #0A0A0A;
  --cf-menu-bg: #FFFFFF;
  --cf-btn-bg: #F5F5F6;
}

.pkp_site_nav_menu, .pkp_navigation_primary_row, .pkp_navigation_primary,
.pkp_navigation_user, .pkp_head_wrapper { background: transparent !important; }

.cf-head {
  position: sticky; top: 0; z-index: 100;
  background: var(--cf-head-bg);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border-bottom: none;
}
.cf-head-inner {
  display: flex; align-items: center; gap: 1.2rem;
  max-width: none; margin: 0; padding: 0.85rem 2rem;
}

.cf-brand { flex: 0 0 auto; }
.pkp_site_name .is_img img { display: none; }

.cf-nav { display: flex; align-items: center; }
ul.pkp_navigation_primary.cf-menu {
  display: flex; align-items: center; gap: 0.1rem;
  list-style: none; margin: 0; padding: 0.25rem;
  background: var(--th-card); border-radius: 999px;
}
.cf-menu > li { position: relative; }
.cf-menu > li > a {
  display: block; padding: 0.42rem 0.9rem; border-radius: 999px;
  color: var(--cf-ink-dim) !important; font-weight: 500; font-size: 0.85rem;
  text-decoration: none; transition: color .2s, background .2s; white-space: nowrap;
}
.cf-menu > li > a:hover { color: #fff !important; background: var(--th-ink); }
.cf-menu li ul {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: var(--cf-menu-bg);
  border: 1px solid var(--th-hairline); border-radius: 16px;
  padding: 0.4rem; margin-top: 0.5rem; list-style: none;
}
.cf-menu li ul a {
  display: block; padding: 0.5rem 0.8rem; border-radius: 10px;
  color: var(--cf-ink) !important; font-size: 0.87rem; text-decoration: none;
}
.cf-menu li ul a:hover { background: var(--cf-btn-bg); }

.cf-actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }

.th-search-form { display: flex; align-items: center; }
.th-search-input {
  width: 140px; padding: 0.45rem 0.95rem;
  border: 1px solid var(--th-hairline); border-radius: 999px;
  background: #fff; color: var(--th-ink);
  font: inherit; font-size: 0.85rem;
  transition: width .25s ease, border-color .2s;
}
.th-search-input:focus { width: 190px; border-color: var(--th-ink); outline: none; }
.th-search-input::placeholder { color: var(--th-smoke); }

.cf-icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%;
  color: var(--cf-ink-dim) !important;
}
.cf-icon-btn:hover { color: var(--th-ink) !important; background: var(--cf-btn-bg); }

.cf-lang { position: relative; }
.cf-lang-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.42rem 0.85rem; border-radius: 999px;
  background: var(--th-card); border: none;
  color: var(--cf-ink) !important; font: inherit; font-size: 0.82rem; font-weight: 600;
  cursor: pointer;
}
.cf-lang-btn:hover { background: #ECECEE; }
.cf-caret { font-size: 0.7rem; opacity: 0.7; }
.cf-lang-menu {
  position: absolute; top: 100%; right: 0; min-width: 170px;
  background: var(--cf-menu-bg);
  border: 1px solid var(--th-hairline); border-radius: 16px;
  padding: 0.4rem; margin-top: 0.5rem; list-style: none;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.cf-lang:hover .cf-lang-menu, .cf-lang:focus-within .cf-lang-menu,
.cf-lang-menu.is-open { opacity: 1; visibility: visible; transform: none; }
.cf-lang-menu a {
  display: block; padding: 0.5rem 0.8rem; border-radius: 10px;
  color: var(--cf-ink) !important; font-size: 0.88rem; text-decoration: none;
}
.cf-lang-menu a:hover { background: var(--cf-btn-bg); }
.cf-lang-menu .is-current a { font-weight: 700; }

ul.pkp_navigation_user.cf-user-menu {
  display: flex; align-items: center; gap: 0.3rem; list-style: none; margin: 0; padding: 0;
}
.cf-user-menu > li > a {
  display: block; padding: 0.45rem 0.95rem; border-radius: 999px;
  color: var(--cf-ink-dim) !important; font-weight: 500; font-size: 0.85rem; text-decoration: none;
  white-space: nowrap;
}
.cf-user-menu > li > a:hover { color: var(--th-ink) !important; background: var(--cf-btn-bg); }
.cf-user-menu > li:last-child > a {
  background: var(--th-ink);
  color: #fff !important; font-weight: 500;
}
.cf-user-menu > li:last-child > a:hover { opacity: 0.85; color: #fff !important; }

.cf-burger { display: none; position: static; float: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.cf-burger span { display: block; width: 24px; height: 2px; background: var(--cf-ink); margin: 5px 0; border-radius: 2px; transition: transform .25s, opacity .2s; }
.cf-head.cf-open .cf-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.cf-head.cf-open .cf-burger span:nth-child(2) { opacity: 0; }
.cf-head.cf-open .cf-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1080px) {
  .cf-head-inner { flex-wrap: wrap; column-gap: 0.6rem; row-gap: 0; padding: 0.7rem 1.1rem; }
  .cf-brand { margin-right: auto; }
  .cf-burger { display: block; order: 2; }
  .cf-nav, .cf-actions {
    order: 3; flex-basis: 100%; width: 100%;
    position: static; max-height: 0; overflow: hidden;
    transition: max-height .3s ease;
  }
  .cf-head.cf-open .cf-nav { max-height: 74vh; overflow: auto; padding: 0.9rem 0 0.4rem; border-top: 1px solid var(--th-hairline); margin-top: 0.4rem; }
  .cf-head.cf-open .cf-actions { max-height: 44vh; overflow: visible; padding: 0.2rem 0 0.9rem; }
  ul.pkp_navigation_primary.cf-menu { flex-direction: column; align-items: stretch; gap: 0.1rem; width: 100%; background: transparent; border-radius: 0; padding: 0; }
  .cf-menu > li { width: 100%; }
  .cf-menu > li > a { padding: 0.7rem 0.5rem; font-size: 1rem; }
  .cf-menu > li > a:hover { color: var(--th-ink) !important; background: var(--cf-btn-bg); }
  .cf-menu li ul {
    position: static; border: none; background: transparent;
    margin: 0.1rem 0 0.4rem 1rem; padding: 0; min-width: 0;
  }
  .cf-actions { margin-left: 0; flex-wrap: wrap; gap: 0.6rem; justify-content: flex-start; }
  .th-search-input, .th-search-input:focus { width: 100%; }
  .th-search-form { width: 100%; }
  .cf-lang { width: 100%; }
  .cf-lang-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    border: none; background: transparent; padding: 0.2rem 0 0 0.8rem; margin: 0.3rem 0 0;
  }
  .cf-user-menu { flex-wrap: wrap; gap: 0.5rem; }
}

/* ============ Brand ============ */
.th-brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.th-brand-mark { flex: 0 0 auto; }
.th-brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.th-brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--th-ink);
}
.th-brand-sub {
  font-family: var(--th-font-mono);
  font-size: 0.58rem; letter-spacing: 0.1em;
  color: var(--th-smoke); text-transform: uppercase;
}

/* ============ Reveal animation ============ */
[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal-delay="1"] { transition-delay: 0.12s; }
[data-reveal-delay="2"] { transition-delay: 0.24s; }
[data-reveal-delay="3"] { transition-delay: 0.36s; }

/* ============ Buttons — landing pills ============ */
.th-btn {
  display: inline-flex; align-items: center;
  padding: 0.72rem 1.5rem;
  border-radius: 999px;
  font-family: var(--th-font-body);
  font-weight: 500;
  font-size: 0.85rem;
  text-decoration: none;
  transition: opacity 0.2s ease, background 0.2s ease;
  margin: 0 0.5rem 0.6rem 0;
}
.th-btn-dark { background: var(--th-ink); color: #fff !important; }
.th-btn-dark:hover { opacity: 0.82; }
.th-btn-ghost {
  background: transparent;
  border: 1px solid rgba(0, 0, 0, 0.35);
  color: var(--th-ink) !important;
}
.th-btn-ghost:hover { background: rgba(0, 0, 0, 0.05); }

/* ============ Sections ============ */
.th-section { max-width: var(--th-max); margin: 0 auto; padding: var(--th-section-gap) 2rem; position: relative; }
.th-section + .th-section { padding-top: 0; }
.th-kicker {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px;
  color: var(--th-smoke);
  margin-bottom: 1rem;
}
.th-kicker::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--th-ink); flex: none;
}

/* ============ HERO — full-viewport statue (landing merge) ============ */
.th-hero2 {
  position: relative;
  min-height: calc(100vh - 62px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--th-canvas);
}
.th-hero2-media {
  position: absolute; inset: 0; z-index: 0;
}
.th-hero2-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
@media (max-width: 900px) {
  .th-hero2-media img { object-position: 68% 30%; }
}
.th-hero2-content {
  position: relative; z-index: 30;
  background: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0.82) 52%, transparent 100%);
  padding: 7rem 2rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}
.th-hero2-title {
  font-weight: 300 !important;
  font-size: clamp(2rem, 5.5vw, 4.5rem) !important;
  letter-spacing: -0.03em !important;
  line-height: 1 !important;
  color: var(--th-ink);
  margin: 0 0 0.4rem;
}
.th-hero2-sub {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--th-smoke);
  margin: 0;
}
.th-hero2-sub .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--th-ink); flex: none; }
.th-hero2-row {
  display: flex; flex-direction: column; gap: 1rem;
}
.th-hero2-cta { display: flex; align-items: center; flex-wrap: wrap; }
.th-hero2-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.th-tag {
  background: #fff;
  border: 1px solid var(--th-hairline);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 11px; font-weight: 500; color: var(--th-ink);
}
@media (min-width: 900px) {
  .th-hero2-row { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .th-hero2-tags { padding-bottom: 10px; }
}

/* ============ Horizontal overflow guard ============ */
html, body { overflow-x: clip; }
.cf-user { position: relative; }
.cf-user-menu > li { position: relative; }
.cf-user-menu li ul {
  position: absolute; top: 100%; right: 0; min-width: 200px;
  background: #fff;
  border: 1px solid var(--th-hairline); border-radius: 16px;
  padding: 0.4rem; margin-top: 0.5rem; list-style: none;
  z-index: 60;
}
.cf-user-menu li ul a {
  display: block; padding: 0.5rem 0.8rem; border-radius: 10px;
  color: var(--th-ink) !important; font-size: 0.87rem; text-decoration: none;
  background: transparent;
}
.cf-user-menu li ul a:hover { background: var(--cf-btn-bg); }

/* ============ Login / Register — landing-style card ============ */
.pkp_page_login .pkp_structure_main,
.pkp_page_user.pkp_op_register .pkp_structure_main {
  max-width: 30rem !important;
  margin: 0 auto !important;
  padding: 3.5rem 1.2rem 5rem !important;
  float: none !important;
  width: auto !important;
}
.pkp_page_login .pkp_structure_content,
.pkp_page_user.pkp_op_register .pkp_structure_content { display: block; }
.pkp_page_login .pkp_structure_sidebar,
.pkp_page_user.pkp_op_register .pkp_structure_sidebar { display: none; }
.pkp_page_user.pkp_op_register .pkp_structure_main { max-width: 36rem !important; }

.cmp_form, .pkp_form {
  background: var(--th-card);
  border-radius: 24px;
  padding: 1.8rem 1.6rem;
}
.cmp_form .fields, .pkp_form .fields { margin: 0; }
.cmp_form label, .pkp_form label,
.cmp_form .label, .pkp_form .label {
  font-size: 0.82rem; font-weight: 500; color: var(--th-ink-2);
}
.cmp_form input[type="text"],
.cmp_form input[type="email"],
.cmp_form input[type="password"],
.pkp_form input[type="text"],
.pkp_form input[type="email"],
.pkp_form input[type="password"],
.cmp_form select, .pkp_form select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--th-hairline);
  border-radius: 999px;
  padding: 0.65rem 1.1rem;
  font: inherit; font-size: 0.92rem;
  color: var(--th-ink);
}
.cmp_form input:focus, .pkp_form input:focus,
.cmp_form select:focus, .pkp_form select:focus {
  outline: none; border-color: var(--th-ink);
}
.cmp_form textarea, .pkp_form textarea {
  width: 100%; background: #fff;
  border: 1px solid var(--th-hairline); border-radius: 16px;
  padding: 0.7rem 1rem; font: inherit;
}
.cmp_form .buttons button, .pkp_form .buttons button,
.cmp_form button[type="submit"], .pkp_form button[type="submit"] {
  background: var(--th-ink); color: #fff;
  border: none; border-radius: 999px;
  padding: 0.72rem 1.6rem; font-weight: 500; font-size: 0.9rem;
  cursor: pointer;
}
.cmp_form .buttons button:hover, .pkp_form .buttons button:hover { opacity: 0.85; }
.cmp_form a, .pkp_form a { color: var(--th-ink); }

/* ============ About / EIC ============ */
.th-jabout-body { color: var(--th-ink-2); line-height: 1.75; max-width: 50rem; font-size: 1.02rem; }

.th-eic-card {
  display: flex; gap: 1.5rem; align-items: center;
  background: var(--th-card);
  border-radius: 20px;
  padding: 1.7rem 2rem;
  max-width: 44rem;
}
.th-eic-avatar {
  flex: 0 0 68px; width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--th-ink);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 600;
}
.th-eic-name { font-size: 1.15rem; font-weight: 600; margin: 0 0 0.2rem; }
.th-eic-title { color: var(--th-ink-2); font-size: 0.92rem; margin: 0; }

/* ============ Current issue ============ */
.current_issue { border-top: 1px solid var(--th-hairline); }
.current_issue_title {
  font-family: var(--th-font-mono);
  color: var(--th-smoke); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
  margin: 0.6rem 0 1.4rem;
}
.obj_issue_toc .title { color: var(--th-ink); }
.obj_article_summary {
  background: var(--th-card);
  border: none;
  border-radius: 16px;
  padding: 1.2rem 1.4rem; margin-bottom: 0.9rem;
}
.obj_article_summary .title a { color: var(--th-ink); font-weight: 600; }
.obj_article_summary .title a:hover { opacity: 0.7; }
.obj_article_summary .meta, .obj_article_summary .authors { color: var(--th-ink-2); }
.obj_article_summary .pages, .obj_issue_toc .pages {
  font-family: var(--th-font-mono);
  color: var(--th-smoke) !important; font-size: 11px;
}
.obj_issue_toc .sections .section > h2,
.obj_issue_toc .sections .section > h3,
.obj_issue_toc .section > h2,
.obj_issue_toc .section > h3 {
  background: transparent !important;
  color: var(--th-ink) !important;
  font-weight: 600;
}
.obj_issue_toc .section { border-top: none; }
.obj_issue_toc .published, .obj_issue_toc .description { color: var(--th-ink-2); }
.read_more { color: var(--th-ink); font-weight: 600; }

/* ============ Indexing band — inverted black ============ */
.th-index-band {
  background: var(--th-dark);
  color: var(--th-ink-inv);
  padding: var(--th-section-gap) 0;
  margin-top: var(--th-section-gap);
}
.th-index-inner { max-width: var(--th-max); margin: 0 auto; padding: 0 2rem; }
.th-index-band .th-h2 { color: #fff !important; margin: 0.3rem 0 0.8rem; }
.th-index-band .th-kicker { color: var(--th-ink-inv-dim); }
.th-index-band .th-kicker::before { background: #fff; }
.th-index-lede,
.pkp_structure_main .th-index-band p,
.pkp_structure_main .th-index-band li { color: var(--th-ink-inv-dim); }
.th-index-lede { max-width: 46rem; margin: 0 0 2.4rem; }
.th-badges {
  list-style: none; margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 0.8rem;
}
.th-badges li { margin: 0; }
.th-badge {
  display: flex; flex-direction: column; gap: 0.3rem;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  text-decoration: none;
  color: #fff !important;
  transition: border-color .2s ease, background .2s ease, transform .2s ease;
  min-height: 72px; justify-content: center;
}
.th-badge-name { font-weight: 600; font-size: 0.98rem; letter-spacing: -0.01em; }
.th-badge-desc { font-family: var(--th-font-mono); font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--th-ink-inv-dim); }
.th-badge:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-3px);
}
.th-badge.is-pending { opacity: 0.5; }
.th-badge.is-pending:hover { opacity: 0.85; }

/* ============ Policies grid ============ */
.th-policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.th-policy-card {
  display: block;
  background: var(--th-card);
  border-radius: 20px;
  padding: 1.5rem 1.6rem;
  text-decoration: none;
  color: var(--th-ink) !important;
  transition: transform .2s ease, background .2s ease;
}
.th-policy-card:hover { transform: translateY(-4px); background: #EFEFF1; }
.th-policy-card h3 {
  font-size: 1rem !important; font-weight: 600; margin: 0 0 0.4rem;
}
.th-policy-card p { color: var(--th-smoke); font-size: 0.86rem; line-height: 1.5; margin: 0; }

/* ============ Footer — black ============ */
.pkp_structure_footer_wrapper {
  background: var(--th-dark);
  border-top: none;
  color: var(--th-ink-inv-dim);
}
.pkp_structure_footer_wrapper a { color: #fff; }
.pkp_structure_footer_wrapper a:hover { opacity: 0.75; }
.th-footer { max-width: var(--th-max); margin: 0 auto; padding: 3rem 2rem 1.5rem; }
.th-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.1fr 1fr 0.8fr;
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.th-footer-brand { font-weight: 600; font-size: 1.02rem; letter-spacing: -0.01em; color: #fff; }
.th-footer-tag { font-size: 0.88rem; line-height: 1.6; margin-top: 0.6rem; }
.th-footer-h {
  font-family: var(--th-font-mono);
  font-size: 10.5px !important;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin: 0 0 0.7rem;
}
.th-footer-col p { margin: 0 0 0.45rem; font-size: 0.9rem; }
.th-footer-issn { font-family: var(--th-font-mono); font-size: 0.8rem; }
.th-footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding-top: 1.4rem;
  font-size: 0.8rem;
}
.th-footer-ojs { color: var(--th-ink-inv-dim) !important; }
.pkp_brand_footer { display: none; }
@media (max-width: 860px) { .th-footer-grid { grid-template-columns: 1fr 1fr; } }

/* ============ Inner pages ============ */
.pkp_structure_main h1, .pkp_structure_main h2, .pkp_structure_main h3 { color: var(--th-ink); }
.pkp_structure_main, .pkp_structure_main p, .pkp_structure_main li { color: var(--th-ink-2); }
.pkp_structure_sidebar .pkp_block {
  background: var(--th-card);
  border: none;
  border-radius: 20px;
  padding: 1.3rem;
}
.pkp_structure_sidebar .title { color: var(--th-ink); font-weight: 600; }
.cmp_button, .pkp_button, button.submit {
  background: var(--th-ink);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-weight: 500;
}
.cmp_button:hover, .pkp_button:hover, button.submit:hover { opacity: 0.85; }

/* Sidebar badge block */
.th-side-badges { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.th-side-badges a {
  display: flex; align-items: baseline; justify-content: space-between; gap: 0.5rem;
  padding: 0.55rem 0.95rem;
  border: 1px solid var(--th-hairline); border-radius: 999px;
  text-decoration: none; color: var(--th-ink) !important;
  font-weight: 600; font-size: 0.88rem;
  transition: border-color .2s, background .2s;
}
.th-side-badges a:hover { border-color: var(--th-ink); background: var(--th-mist); }
.th-side-badges .th-meta { font-size: 9.5px; }

/* Breadcrumbs */
.cmp_breadcrumbs, .cmp_breadcrumbs .current, .cmp_breadcrumbs .separator { color: var(--th-smoke) !important; }
.cmp_breadcrumbs a { color: var(--th-ink-2) !important; }
.cmp_breadcrumbs a:hover { color: var(--th-ink) !important; }

/* Article page */
.obj_article_details .item .label { color: var(--th-ink); font-family: var(--th-font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; }
.obj_article_details .item .value, .obj_article_details .item { color: var(--th-ink-2); }
.obj_article_details .item .value a, .obj_article_details .authors a { color: var(--th-ink); }
.obj_article_details .item .value a:hover { opacity: 0.7; }
.obj_article_details .row, .obj_article_details .main_entry, .obj_article_details .entry_details { border-color: var(--th-hairline); }
.obj_article_details .entry_details .item { border-bottom-color: var(--th-hairline); }

.item.keywords .value {
  display: inline-flex; flex-wrap: wrap; gap: 0.4em 0.5em; align-items: center;
  border: 1px solid var(--th-hairline);
  background: var(--th-mist);
  border-radius: 999px;
  padding: 0.2em 0.9em;
  color: var(--th-ink-2);
  font-weight: 500;
}

.item.citation_display .value, #citationOutput, .csl-entry { color: var(--th-ink-2); background: transparent; }
.item.citation_display .label, .citation_formats_button { color: var(--th-ink) !important; }
.citation_formats { background: #fff; border: 1px solid var(--th-hairline) !important; border-radius: 16px; }
.citation_formats_styles a { color: var(--th-ink-2); border-bottom-color: var(--th-hairline) !important; }
.citation_formats_styles a:hover { color: var(--th-ink); background: var(--th-mist); }

/* PDF galley button */
.galleys_links { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.galleys_links li { margin: 0; }
.obj_galley_link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.1rem; border-radius: 999px;
  font-weight: 500; font-size: 0.85rem;
  color: #fff !important; text-decoration: none;
  background: var(--th-ink);
  border: none;
  transition: opacity 0.15s ease;
}
.obj_galley_link::before {
  content: ""; width: 15px; height: 18px; flex: none;
  background: currentColor;
  -webkit-mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M14 2v6h6' fill='none' stroke='%23000' stroke-width='2'/%3E%3Ctext x='12' y='18' font-size='7' font-weight='700' text-anchor='middle' fill='%23000'%3EPDF%3C/text%3E%3C/svg%3E");
          mask: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h9l5 5v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Z' fill='none' stroke='%23000' stroke-width='2'/%3E%3Cpath d='M14 2v6h6' fill='none' stroke='%23000' stroke-width='2'/%3E%3Ctext x='12' y='18' font-size='7' font-weight='700' text-anchor='middle' fill='%23000'%3EPDF%3C/text%3E%3C/svg%3E");
}
.obj_galley_link:hover { opacity: 0.82; }
.obj_galley_link.restricted { opacity: 0.6; }

.pkp_structure_main .th-hero2-cta,
.pkp_structure_main .th-hero2-tags { margin-left: 0 !important; }

/* ============ Reduced motion ============ */
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}
