/*
Theme Name: Code the Matrix
Theme URI: https://codethematrix.ru/
Author: Code the Matrix
Author URI: https://codethematrix.ru/
Description: Индивидуальная редакционная тема Code the Matrix для статей, наблюдений и магазина цифровых книг WooCommerce.
Version: 1.2.3
Requires at least: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: codethematrix
Tags: blog, news, e-commerce, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, wide-blocks
*/

:root {
  --ctm-ink: #10110e;
  --ctm-ink-soft: #171914;
  --ctm-paper: #eeefe7;
  --ctm-paper-soft: #e4e5dc;
  --ctm-acid: #caff3d;
  --ctm-acid-deep: #95c01f;
  --ctm-muted: #92948a;
  --ctm-line-dark: rgba(238, 239, 231, 0.16);
  --ctm-line-light: rgba(16, 17, 14, 0.17);
  --ctm-sans: "Helvetica Neue", "Segoe UI", Arial, sans-serif;
  --ctm-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --ctm-shell: min(100% - 64px, 1440px);
  --ctm-content: 760px;
  --ctm-radius: 0;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ctm-ink); }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--ctm-ink);
  color: var(--ctm-paper);
  font-family: var(--ctm-sans);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
body::before {
  position: fixed;
  z-index: 999;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .025;
  background:
    repeating-linear-gradient(113deg, transparent 0 3px, rgba(255,255,255,.13) 4px, transparent 5px 9px),
    repeating-linear-gradient(27deg, transparent 0 7px, rgba(255,255,255,.08) 8px, transparent 9px 13px);
  background-size: 17px 19px, 23px 29px;
}
::selection { color: var(--ctm-ink); background: var(--ctm-acid); }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
.ctm-shell { width: var(--ctm-shell); margin-inline: auto; }
.ctm-screen-reader-text,
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.ctm-screen-reader-text:focus,
.screen-reader-text:focus {
  z-index: 10000; top: 12px; left: 12px; width: auto; height: auto;
  padding: 12px 16px; clip: auto; color: var(--ctm-ink); background: var(--ctm-acid);
}
:focus-visible { outline: 2px solid var(--ctm-acid); outline-offset: 4px; }

/* Header */
.ctm-header-widget { margin: 0; padding: 0; }
.ctm-header-widget__title { margin: 0; }
.ctm-header-widget:empty { display: none; }
.ctm-header {
  position: sticky; z-index: 100; top: 0;
  border-bottom: 1px solid var(--ctm-line-dark);
  background: rgba(16,17,14,.92);
  backdrop-filter: blur(16px);
}
.ctm-header__inner {
  display: grid; grid-template-columns: auto minmax(0,1fr) auto;
  gap: clamp(18px, 2.2vw, 38px); align-items: center; min-height: 88px;
}
.ctm-brand { display: inline-flex; gap: 13px; align-items: center; width: fit-content; }
.ctm-brand__mark {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 1px solid currentColor; border-radius: 50%;
  color: var(--ctm-acid); font-family: var(--ctm-mono); font-size: 9px; letter-spacing: -.08em;
}
.ctm-brand__name { font-size: 13px; font-weight: 650; letter-spacing: .08em; text-transform: uppercase; }
.ctm-brand .custom-logo { width: auto; max-width: 172px; max-height: 48px; }
.ctm-nav { display: flex; gap: 12px; align-items: center; min-width: 0; justify-self: end; }
.ctm-menu { display: flex; flex-wrap: wrap; gap: 12px clamp(10px, 1.1vw, 18px); margin: 0; padding: 0; list-style: none; }
.ctm-nav > .ctm-menu { justify-content: center; }
.ctm-nav__socials { display: inline-flex; gap: 6px; align-items: center; flex: 0 0 auto; padding-left: 12px; border-left: 1px solid var(--ctm-line-dark); }
.ctm-menu > li { position: relative; }
.ctm-menu a { display: block; padding-block: 8px; }
.ctm-menu .sub-menu { display: none; position: absolute; z-index: 2; top: 100%; left: 0; min-width: 220px; margin: 0; padding: 10px 16px; border: 1px solid var(--ctm-line-dark); background: var(--ctm-ink); list-style: none; }
.ctm-menu li:hover > .sub-menu,
.ctm-menu li:focus-within > .sub-menu { display: block; }
.ctm-menu .sub-menu a { padding-block: 12px; }
.ctm-menu a,
.ctm-header__telegram,
.ctm-header__youtube,
.ctm-account-link {
  color: #a7a99e; font-family: var(--ctm-mono); font-size: 10px;
  letter-spacing: .035em; text-transform: uppercase; transition: color 180ms ease;
}
.ctm-menu a:hover,
.ctm-menu .current-menu-item > a,
.ctm-header__telegram:hover,
.ctm-header__youtube:hover,
.ctm-account-link:hover { color: var(--ctm-acid); }
.ctm-header__actions { display: flex; gap: 8px; align-items: center; }
.ctm-header__telegram,
.ctm-header__youtube { display: inline-grid; place-items: center; border-radius: 10px; }
.ctm-header__telegram-mark,
.ctm-header__youtube-mark { display: grid; place-items: center; width: 32px; height: 32px; color: #fff; transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease; }
.ctm-header__telegram-mark { border-radius: 50%; background: #2aabee; box-shadow: 0 0 0 1px rgba(42,171,238,.25), 0 0 20px rgba(42,171,238,.16); }
.ctm-header__telegram-mark svg { width: 18px; height: 18px; fill: currentColor; }
.ctm-header__telegram-mark .ctm-header__telegram-cut { fill: #2aabee; transition: fill 180ms ease; }
.ctm-header__youtube-mark { border-radius: 9px; background: #ff0033; box-shadow: 0 0 0 1px rgba(255,0,51,.25), 0 0 22px rgba(255,0,51,.16); }
.ctm-header__youtube-mark svg { width: 21px; height: 21px; fill: currentColor; }
.ctm-header__telegram:hover .ctm-header__telegram-mark { background: #4bbcf3; transform: translateY(-2px) scale(1.06); }
.ctm-header__telegram:hover .ctm-header__telegram-cut { fill: #4bbcf3; }
.ctm-header__youtube:hover .ctm-header__youtube-mark { background: #ff214a; transform: translateY(-2px) scale(1.06); box-shadow: 0 0 0 1px rgba(255,0,51,.4), 0 0 26px rgba(255,0,51,.25); }
.ctm-cart-link { position: relative; display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--ctm-line-dark); border-radius: 50%; }
.ctm-cart-link:hover { border-color: var(--ctm-acid); color: var(--ctm-acid); }
.ctm-cart-count {
  position: absolute; top: -6px; right: -6px; display: grid; place-items: center;
  min-width: 18px; height: 18px; padding-inline: 4px; border-radius: 99px;
  color: var(--ctm-ink); background: var(--ctm-acid); font-family: var(--ctm-mono); font-size: 9px;
}
.ctm-menu-toggle { display: none; border: 0; color: var(--ctm-paper); background: none; font-family: var(--ctm-mono); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
.ctm-menu-toggle span { color: var(--ctm-acid); }
.admin-bar .ctm-header { top: 32px; }
:where(#experience, #signals, #position, #lenses, #method, #observation, #journal, #consciousness, #patterns, #simulation) { scroll-margin-top: 130px; }
.ctm-anchor { display: block; height: 0; }

/* Common */
.ctm-eyebrow,
.ctm-section-index,
.ctm-meta,
.ctm-card__meta,
.ctm-footer__meta,
.ctm-kicker {
  font-family: var(--ctm-mono); font-size: 10px; letter-spacing: .085em; text-transform: uppercase;
}
.ctm-eyebrow { display: flex; gap: 10px; align-items: flex-start; max-width: 58ch; color: #a7a99e; line-height: 1.6; }
.ctm-status-dot { flex: 0 0 7px; width: 7px; height: 7px; margin-top: .45em; border-radius: 50%; background: var(--ctm-acid); box-shadow: 0 0 0 5px rgba(202,255,61,.08), 0 0 18px rgba(202,255,61,.7); animation: ctm-pulse 2s ease-in-out infinite; }
.ctm-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.wp-element-button {
  display: inline-flex; justify-content: space-between; align-items: center; gap: 28px;
  min-height: 52px; padding: 0 20px; border: 1px solid transparent; border-radius: 0 !important;
  color: var(--ctm-ink) !important; background: var(--ctm-acid) !important;
  font-family: var(--ctm-mono); font-size: 10px; font-weight: 600; letter-spacing: .045em; line-height: 1; text-transform: uppercase;
  transition: transform 180ms ease, background 180ms ease;
}
.ctm-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.wp-element-button:hover { transform: translateY(-2px); background: #dcff7b !important; }
.ctm-button--outline { border-color: #4c4e47; color: var(--ctm-paper) !important; background: transparent !important; }
.ctm-button--outline:hover { border-color: var(--ctm-acid); color: var(--ctm-ink) !important; background: var(--ctm-acid) !important; }
.ctm-text-link { padding-bottom: 5px; border-bottom: 1px solid #5d5f56; color: #c7c9bf; font-size: 12px; }
.ctm-text-link:hover { color: var(--ctm-acid); }
.ctm-section { padding-block: 132px; }
.ctm-section-head { display: grid; grid-template-columns: 1fr 3fr; gap: 24px; margin-bottom: 66px; }
.ctm-section-index { color: #73756d; }
.ctm-section-head h2,
.ctm-page-hero h1,
.ctm-archive-hero h1 {
  margin: -.12em 0 0; font-size: clamp(44px, 5.7vw, 84px); font-weight: 500; line-height: .97; letter-spacing: -.06em;
}
.ctm-section-head p { max-width: 600px; margin: 26px 0 0; color: var(--ctm-muted); font-size: 16px; line-height: 1.62; }

/* Front page */
.ctm-hero { position: relative; display: grid; grid-template-columns: minmax(0,1.12fr) minmax(400px,.88fr); min-height: calc(100svh - 88px); padding: 64px 0 46px; }
.ctm-hero__copy { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; }
.ctm-hero h1 { margin: 10.5vh 0 0; max-width: 850px; font-size: clamp(58px, 7.3vw, 116px); font-weight: 500; line-height: .87; letter-spacing: -.074em; }
.ctm-hero h1 em { color: var(--ctm-acid); font-style: normal; }
.ctm-hero__lead { max-width: 580px; margin: 38px 0 0; color: #a7a99e; font-size: clamp(16px,1.2vw,19px); line-height: 1.56; letter-spacing: -.015em; }
.ctm-hero__actions { display: flex; gap: 28px; align-items: center; margin-top: 38px; }
.ctm-hero__foot { position: absolute; bottom: 22px; left: 0; display: flex; gap: 50px; color: #65675f; font-family: var(--ctm-mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.ctm-core {
  position: relative; display: grid; place-items: center; align-self: center; aspect-ratio: 1; overflow: hidden;
  border: 1px solid var(--ctm-line-dark);
  background:
    linear-gradient(rgba(238,239,231,.06) 1px,transparent 1px),
    linear-gradient(90deg,rgba(238,239,231,.06) 1px,transparent 1px),
    radial-gradient(circle at 50% 50%,rgba(202,255,61,.08),transparent 50%);
  background-size: 12.5% 12.5%,12.5% 12.5%,100% 100%;
}
.ctm-core::before { position: absolute; top: 18px; right: 18px; width: 6px; height: 6px; border-radius: 50%; background: var(--ctm-acid); box-shadow: 0 0 18px rgba(202,255,61,.8); content: ""; }
.ctm-core__label { position: absolute; z-index: 3; color: #777970; font-family: var(--ctm-mono); font-size: 8px; letter-spacing: .09em; text-transform: uppercase; }
.ctm-core__label--top { top: 18px; left: 18px; }
.ctm-core__label--left { bottom: 18px; left: 18px; }
.ctm-core__label--right { right: 18px; bottom: 18px; }
.ctm-core__cross { position: absolute; background: rgba(202,255,61,.22); }
.ctm-core__cross--x { width: 100%; height: 1px; }
.ctm-core__cross--y { width: 1px; height: 100%; }
.ctm-orbit { position: absolute; border: 1px solid rgba(238,239,231,.16); border-radius: 50%; }
.ctm-orbit::after { position: absolute; top: 50%; left: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--ctm-acid); box-shadow: 0 0 12px var(--ctm-acid); content: ""; }
.ctm-orbit--one { width: 72%; height: 72%; animation: ctm-rotate 24s linear infinite; }
.ctm-orbit--two { width: 52%; height: 52%; border-style: dashed; animation: ctm-rotate-reverse 18s linear infinite; }
.ctm-core__sphere { position: relative; z-index: 2; display: grid; place-items: center; width: 31%; aspect-ratio: 1; border: 1px solid rgba(202,255,61,.46); border-radius: 50%; background: radial-gradient(circle at 36% 29%,#f5ffd9 0 2%,#caff3d 4%,#5e7a19 17%,#17200e 43%,#070905 68%); box-shadow: 0 0 32px rgba(202,255,61,.18),0 0 100px rgba(202,255,61,.13),inset -14px -18px 30px #000; animation: ctm-float 7s ease-in-out infinite; }
.ctm-core__sphere::before { position: absolute; inset: -11px; border: 1px solid rgba(202,255,61,.2); border-radius: 50%; content: ""; }
.ctm-core__sphere span { color: rgba(238,239,231,.7); font-family: var(--ctm-mono); font-size: clamp(18px,2vw,32px); text-shadow: 0 0 16px #fff; }
.ctm-core__scan { position: absolute; z-index: 3; top: 0; width: 100%; height: 1px; opacity: .5; background: linear-gradient(90deg,transparent,var(--ctm-acid),transparent); animation: ctm-scan 5s linear infinite; }
.ctm-ticker { overflow: hidden; color: var(--ctm-ink); background: var(--ctm-acid); }
.ctm-ticker__track { display: flex; align-items: center; gap: 28px; width: max-content; min-height: 46px; white-space: nowrap; animation: ctm-ticker 34s linear infinite; }
.ctm-ticker span { font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; }
.ctm-ticker i { font-size: 9px; font-style: normal; }
.ctm-topic-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-top: 1px solid var(--ctm-line-dark); border-left: 1px solid var(--ctm-line-dark); }
.ctm-topic-card { position: relative; display: flex; flex-direction: column; min-height: 295px; padding: 22px; border-right: 1px solid var(--ctm-line-dark); border-bottom: 1px solid var(--ctm-line-dark); transition: color 220ms ease,background 220ms ease; }
.ctm-topic-card:hover { color: var(--ctm-ink); background: var(--ctm-acid); }
.ctm-topic-card__number { color: #777970; font-family: var(--ctm-mono); font-size: 9px; }
.ctm-topic-card h3 { margin: auto 0 18px; font-size: clamp(29px,2.6vw,44px); font-weight: 500; letter-spacing: -.05em; }
.ctm-topic-card p { margin: 0; color: var(--ctm-muted); font-size: 13px; line-height: 1.55; }
.ctm-topic-card:hover p { color: rgba(16,17,14,.7); }
.ctm-topic-card__arrow { position: absolute; top: 20px; right: 20px; font-style: normal; }
.ctm-manifesto { color: var(--ctm-ink); background: var(--ctm-paper); }
.ctm-manifesto__inner { position: relative; min-height: 720px; padding-block: 90px; overflow: hidden; }
.ctm-manifesto__statement { position: relative; z-index: 2; max-width: 1210px; margin: 120px 0 0; font-size: clamp(47px,7vw,102px); font-weight: 500; line-height: .98; letter-spacing: -.065em; }
.ctm-manifesto__statement em { color: #a0a299; font-style: normal; }
.ctm-manifesto__note { position: absolute; right: 0; bottom: 64px; display: grid; grid-template-columns: 110px 1fr; gap: 22px; width: min(100%,570px); padding-top: 16px; border-top: 1px solid var(--ctm-line-light); }
.ctm-manifesto__note span { font-family: var(--ctm-mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.ctm-manifesto__note p { margin: 0; color: #6d6f67; font-size: 14px; line-height: 1.6; }
.ctm-manifesto__orbit { position: absolute; top: -42%; right: -12%; width: 630px; aspect-ratio: 1; border: 1px solid rgba(16,17,14,.12); border-radius: 50%; }
.ctm-manifesto__orbit::after { position: absolute; bottom: 14%; left: 6%; width: 13px; height: 13px; border-radius: 50%; background: var(--ctm-acid-deep); content: ""; }
.ctm-lens-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border-top: 1px solid var(--ctm-line-dark); border-left: 1px solid var(--ctm-line-dark); }
.ctm-lens { padding: 24px; border-right: 1px solid var(--ctm-line-dark); border-bottom: 1px solid var(--ctm-line-dark); }
.ctm-lens > span { color: var(--ctm-acid); font-family: var(--ctm-mono); font-size: 11px; }
.ctm-lens h3 { margin: 90px 0 22px; font-size: clamp(34px,3vw,50px); font-weight: 500; letter-spacing: -.052em; }
.ctm-lens p { margin: 0; color: var(--ctm-muted); font-size: 15px; line-height: 1.6; }
.ctm-method { color: var(--ctm-ink); background: var(--ctm-acid); }
.ctm-method__inner { display: grid; grid-template-columns: 1fr 1.55fr; gap: 9%; padding-block: 116px; }
.ctm-method h2 { margin: 42px 0 0; color: var(--ctm-ink) !important; font-size: clamp(43px,5vw,76px); font-weight: 500; line-height: .98; letter-spacing: -.06em; }
.ctm-method__list { margin: 0; padding: 0; border-top: 1px solid rgba(16,17,14,.34); list-style: none; }
.ctm-method__list li { display: grid; grid-template-columns: 58px 1fr; gap: 26px; padding: 29px 0 34px; border-bottom: 1px solid rgba(16,17,14,.34); }
.ctm-method__list span { padding-top: 5px; font-family: var(--ctm-mono); font-size: 10px; }
.ctm-method__list h3 { margin: 0 0 12px; color: var(--ctm-ink) !important; font-size: 30px; font-weight: 500; letter-spacing: -.04em; }
.ctm-method__list p { max-width: 550px; margin: 0; color: rgba(16,17,14,.68); font-size: 14px; line-height: 1.55; }
.ctm-store-section { color: var(--ctm-ink); background: var(--ctm-paper); }
.ctm-store-section .ctm-section-index { color: #73756d; }
.ctm-store-section .ctm-section-head p { color: #686a62; }
.ctm-cta { display: grid; grid-template-columns: 1.5fr 1fr; gap: 9%; align-items: end; padding-block: 120px; border-top: 1px solid var(--ctm-line-dark); }
.ctm-cta h2 { margin: 0; font-size: clamp(52px,7.7vw,108px); font-weight: 500; line-height: .91; letter-spacing: -.065em; }
.ctm-cta h2 span { color: var(--ctm-acid); }
.ctm-cta p { color: var(--ctm-muted); font-size: 15px; line-height: 1.65; }

/* Cards and archives */
.ctm-post-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1px; border: 1px solid var(--ctm-line-dark); background: var(--ctm-line-dark); }
.ctm-post-card { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 520px; padding: 20px; background: var(--ctm-ink); transition: background 200ms ease; }
.ctm-post-card:hover { background: var(--ctm-ink-soft); }
.ctm-post-card__image { aspect-ratio: 16/10; margin: -20px -20px 26px; overflow: hidden; background: #20221c; }
.ctm-post-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform 420ms ease; }
.ctm-post-card:hover .ctm-post-card__image img { transform: scale(1.025); }
.ctm-post-card__placeholder { position: relative; width: 100%; height: 100%; background: radial-gradient(circle at 68% 44%,rgba(202,255,61,.22),transparent 12%), linear-gradient(135deg,#121410,#252a1a); }
.ctm-post-card__placeholder::before { position: absolute; inset: 18%; border: 1px solid rgba(202,255,61,.2); border-radius: 50%; content: ""; }
.ctm-card__meta { display: flex; justify-content: space-between; gap: 15px; color: #777970; }
.ctm-post-card h3 { margin: auto 0 22px; font-size: clamp(28px,2.3vw,41px); font-weight: 500; line-height: 1.03; letter-spacing: -.045em; }
.ctm-post-card p { margin: 0 0 24px; color: var(--ctm-muted); font-size: 14px; line-height: 1.58; }
.ctm-post-card__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 17px; border-top: 1px solid var(--ctm-line-dark); color: #777970; font-family: var(--ctm-mono); font-size: 9px; text-transform: uppercase; }
.ctm-post-card__arrow { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid currentColor; border-radius: 50%; transition: transform 180ms ease; }
.ctm-post-card:hover .ctm-post-card__arrow { color: var(--ctm-acid); transform: rotate(45deg); }
.ctm-archive-hero { padding: 82px 0 72px; border-bottom: 1px solid var(--ctm-line-dark); }
.ctm-archive-hero__meta { display: flex; justify-content: space-between; margin-bottom: 68px; color: #777970; }
.ctm-archive-hero h1 span { color: #74766e; }
.ctm-archive-hero__description { max-width: 640px; margin: 28px 0 0 auto; color: var(--ctm-muted); font-size: 16px; line-height: 1.65; }
.ctm-archive { padding-block: 88px 130px; }
.ctm-pagination { margin-top: 48px; }
.ctm-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.ctm-pagination .page-numbers { display: grid; place-items: center; min-width: 42px; height: 42px; border: 1px solid var(--ctm-line-dark); font-family: var(--ctm-mono); font-size: 10px; }
.ctm-pagination .current,
.ctm-pagination a:hover { border-color: var(--ctm-acid); color: var(--ctm-ink); background: var(--ctm-acid); }
.ctm-empty { min-height: 420px; padding-block: 90px; }
.ctm-empty h1 { font-size: clamp(42px,6vw,78px); font-weight: 500; letter-spacing: -.055em; }
.ctm-empty p { max-width: 600px; color: var(--ctm-muted); line-height: 1.65; }

/* Single and page */
.ctm-page-hero,
.ctm-single-hero { padding: 82px 0 72px; border-bottom: 1px solid var(--ctm-line-dark); }
.ctm-single-hero__meta { display: flex; gap: 18px; color: #777970; }
.ctm-single-hero h1 { max-width: 1180px; margin: 68px 0 0; font-size: clamp(52px,7.2vw,106px); font-weight: 500; line-height: .92; letter-spacing: -.068em; }
.ctm-single-hero__excerpt { max-width: 650px; margin: 30px 0 0 auto; color: var(--ctm-muted); font-size: 17px; line-height: 1.65; }
.ctm-single-cover { width: var(--ctm-shell); max-height: 780px; margin: 0 auto; object-fit: cover; }
.ctm-entry-layout { display: grid; grid-template-columns: minmax(120px,1fr) minmax(0,var(--ctm-content)) minmax(160px,1fr); gap: 48px; padding-block: 90px 120px; }
.ctm-entry-aside { color: #777970; font-family: var(--ctm-mono); font-size: 9px; line-height: 1.7; letter-spacing: .06em; text-transform: uppercase; }
.ctm-entry-content { grid-column: 2; min-width: 0; color: #d5d7ce; font-size: 18px; line-height: 1.78; }
.ctm-entry-content > *:first-child { margin-top: 0; }
.ctm-entry-content h2,
.ctm-entry-content h3,
.ctm-entry-content h4 { color: var(--ctm-paper); font-weight: 500; line-height: 1.08; letter-spacing: -.045em; }
.ctm-entry-content h2 { margin: 2.1em 0 .72em; font-size: clamp(35px,4.2vw,55px); }
.ctm-entry-content h3 { margin: 1.8em 0 .65em; font-size: 31px; }
.ctm-entry-content p { margin: 0 0 1.35em; }
.ctm-entry-content a { color: var(--ctm-acid); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ctm-entry-content blockquote { margin: 2.4em -7vw; padding: 1.1em 0 1.1em 7vw; border-left: 2px solid var(--ctm-acid); color: var(--ctm-paper); font-size: clamp(25px,3.3vw,42px); line-height: 1.25; letter-spacing: -.035em; }
.ctm-entry-content ul,
.ctm-entry-content ol { margin: 0 0 1.5em; padding-left: 1.35em; }
.ctm-entry-content li { margin-bottom: .55em; }
.ctm-entry-content figure { margin: 2.5em 0; }
.ctm-entry-content figcaption { margin-top: 10px; color: #777970; font-size: 12px; }
.ctm-entry-content hr { margin: 3em 0; border: 0; border-top: 1px solid var(--ctm-line-dark); }
.ctm-entry-content table { width: 100%; border-collapse: collapse; font-size: 15px; }
.ctm-entry-content th,
.ctm-entry-content td { padding: 13px; border: 1px solid var(--ctm-line-dark); text-align: left; }
.alignwide { width: min(1100px,calc(100vw - 64px)); max-width: none; margin-left: 50%; transform: translateX(-50%); }
.alignfull { width: 100vw; max-width: none; margin-left: 50%; transform: translateX(-50%); }
.ctm-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--ctm-line-dark); }
.ctm-tags a { padding: 8px 11px; border: 1px solid var(--ctm-line-dark); color: var(--ctm-muted); font-family: var(--ctm-mono); font-size: 9px; text-decoration: none; text-transform: uppercase; }
.ctm-post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; border-top: 1px solid var(--ctm-line-dark); border-bottom: 1px solid var(--ctm-line-dark); background: var(--ctm-line-dark); }
.ctm-post-nav a { min-height: 170px; padding: 28px; background: var(--ctm-ink); }
.ctm-post-nav a:hover { background: var(--ctm-ink-soft); }
.ctm-post-nav span { color: #777970; font-family: var(--ctm-mono); font-size: 9px; text-transform: uppercase; }
.ctm-post-nav strong { display: block; margin-top: 55px; font-size: 22px; font-weight: 500; }
.ctm-page-hero h1 { margin-top: 42px; overflow-wrap: anywhere; }
.ctm-page-content { width: min(calc(100% - 64px),var(--ctm-content)); margin-inline: auto; padding-block: 84px 120px; }
.ctm-page-content--commerce { padding-block: 76px 120px; }

/* Forms and comments */
.ctm-search-form { display: flex; max-width: 680px; margin-top: 38px; }
.ctm-search-form input[type="search"],
input[type="text"], input[type="email"], input[type="url"], input[type="password"], input[type="tel"], input[type="number"], textarea, select {
  width: 100%; min-height: 50px; padding: 12px 14px; border: 1px solid #494b44; border-radius: 0; color: var(--ctm-paper); background: #151712;
}
textarea { min-height: 150px; resize: vertical; }
.ctm-search-form button { flex: 0 0 auto; }
.ctm-comments { width: min(var(--ctm-content),calc(100% - 32px)); margin: 0 auto; padding-bottom: 110px; }
.ctm-comments__title { font-size: 34px; font-weight: 500; }
.comment-list { margin: 0 0 52px; padding: 0; list-style: none; }
.comment-list .children { list-style: none; }
.comment-body { padding: 24px 0; border-bottom: 1px solid var(--ctm-line-dark); }
.comment-meta { color: #777970; font-family: var(--ctm-mono); font-size: 10px; }
.comment-content { color: #c9cbc2; line-height: 1.65; }
.comment-reply-title { font-size: 32px; font-weight: 500; }
.comment-form label { display: block; margin-bottom: 7px; color: #a7a99e; font-family: var(--ctm-mono); font-size: 9px; text-transform: uppercase; }

/* WooCommerce */
.ctm-commerce { padding-block: 76px 120px; }
.woocommerce .woocommerce-breadcrumb { margin-bottom: 44px; color: #777970; font-family: var(--ctm-mono); font-size: 9px; text-transform: uppercase; }
.woocommerce .woocommerce-breadcrumb a { color: #a7a99e; }
.woocommerce .woocommerce-result-count,
.woocommerce .woocommerce-ordering { margin-bottom: 34px; color: var(--ctm-muted); }
.woocommerce .woocommerce-ordering select { min-height: 42px; }
.woocommerce ul.products { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1px; margin: 0 !important; border: 1px solid rgba(16,17,14,.17); background: rgba(16,17,14,.17); }
.ctm-commerce .woocommerce ul.products { border-color: var(--ctm-line-dark); background: var(--ctm-line-dark); }
.woocommerce ul.products::before,
.woocommerce ul.products::after { display: none !important; }
.woocommerce ul.products li.product { float: none !important; width: auto !important; min-width: 0; margin: 0 !important; padding: 20px 20px 24px; color: var(--ctm-ink); background: var(--ctm-paper); }
.ctm-commerce .woocommerce ul.products li.product { color: var(--ctm-paper); background: var(--ctm-ink); }
.woocommerce ul.products li.product a img { aspect-ratio: 4/5; margin: 0 0 22px !important; object-fit: cover; background: #d8d9d1; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { padding: 0 !important; font-size: 25px !important; font-weight: 500; line-height: 1.08; letter-spacing: -.04em; }
.woocommerce ul.products li.product .price { color: var(--ctm-acid-deep) !important; font-family: var(--ctm-mono); font-size: 14px !important; }
.ctm-commerce .woocommerce ul.products li.product .price { color: var(--ctm-acid) !important; }
.woocommerce span.onsale { top: 12px !important; left: 12px !important; min-width: 0; min-height: 0; padding: 8px 10px; border-radius: 0; color: var(--ctm-ink); background: var(--ctm-acid); font-family: var(--ctm-mono); font-size: 9px; line-height: 1; text-transform: uppercase; }
.woocommerce div.product { color: var(--ctm-paper); }
.woocommerce div.product div.images,
.woocommerce div.product div.summary { margin-bottom: 70px; }
.woocommerce div.product .product_title { margin: 0 0 24px; font-size: clamp(42px,5.4vw,76px); font-weight: 500; line-height: .95; letter-spacing: -.06em; }
.woocommerce div.product p.price,
.woocommerce div.product span.price { color: var(--ctm-acid) !important; font-family: var(--ctm-mono); font-size: 20px !important; }
.woocommerce div.product .woocommerce-product-details__short-description { color: var(--ctm-muted); font-size: 16px; line-height: 1.65; }
.woocommerce .quantity .qty { min-height: 52px; border: 1px solid #4c4e47; color: var(--ctm-paper); background: #151712; }
.woocommerce div.product .woocommerce-tabs ul.tabs { padding: 0 !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs::before { border-color: var(--ctm-line-dark) !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li { border: 1px solid var(--ctm-line-dark) !important; border-radius: 0 !important; background: var(--ctm-ink-soft) !important; }
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { color: var(--ctm-ink) !important; background: var(--ctm-acid) !important; }
.woocommerce-message,
.woocommerce-info,
.woocommerce-error { border-top-color: var(--ctm-acid) !important; color: var(--ctm-paper); background: var(--ctm-ink-soft); }
.woocommerce-message::before,
.woocommerce-info::before { color: var(--ctm-acid) !important; }
.woocommerce table.shop_table { border-color: var(--ctm-line-dark) !important; border-radius: 0; }
.woocommerce table.shop_table th,
.woocommerce table.shop_table td { border-color: var(--ctm-line-dark) !important; }
.woocommerce-cart table.cart img { width: 74px; }
.woocommerce-checkout #payment { color: var(--ctm-paper); background: var(--ctm-ink-soft); }
.woocommerce-checkout #payment div.payment_box { color: var(--ctm-ink); background: var(--ctm-paper-soft); }
.woocommerce-account .woocommerce-MyAccount-navigation ul { margin: 0 0 30px; padding: 0; list-style: none; }
.woocommerce-account .woocommerce-MyAccount-navigation li a { display: block; padding: 13px 0; border-bottom: 1px solid var(--ctm-line-dark); font-family: var(--ctm-mono); font-size: 10px; text-transform: uppercase; }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { color: var(--ctm-acid); }

/* Footer */
.ctm-footer { border-top: 1px solid var(--ctm-line-dark); }
.ctm-footer__legal { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 14px 28px; padding-top: 24px; border-top: 1px solid var(--ctm-line-dark); font-size: 14px; line-height: 1.6; color: #b7b9af; }
.ctm-footer__legal a { text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.ctm-footer__legal a:hover, .ctm-footer__legal a:focus-visible { color: var(--ctm-acid); }
.ctm-page-content { overflow-wrap: anywhere; }
.ctm-footer__inner { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 32px; align-items: end; min-height: 220px; padding-block: 50px; }
.ctm-footer__copy { max-width: 360px; margin: 0; color: #74766e; font-size: 12px; line-height: 1.6; }
.ctm-footer__nav { display: flex; flex-wrap: wrap; gap: 9px 20px; }
.ctm-footer__nav a { color: #8d8f86; font-family: var(--ctm-mono); font-size: 9px; text-transform: uppercase; }
.ctm-footer__nav a:hover { color: var(--ctm-acid); }
.ctm-footer__meta { display: flex; flex-direction: column; gap: 8px; justify-self: end; color: #686a62; text-align: right; }

@keyframes ctm-pulse { 0%,100% { opacity:.55; transform:scale(.9); } 50% { opacity:1; transform:scale(1); } }
@keyframes ctm-float { 0%,100% { transform:translateY(-5px) scale(.98); } 50% { transform:translateY(8px) scale(1.02); } }
@keyframes ctm-rotate { to { transform:rotate(360deg); } }
@keyframes ctm-rotate-reverse { to { transform:rotate(-360deg); } }
@keyframes ctm-scan { from { top:4%; opacity:0; } 12%,88% { opacity:.5; } to { top:96%; opacity:0; } }
@keyframes ctm-ticker { to { transform:translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media (max-width: 1100px) {
  .ctm-nav { display: block; grid-column: 1 / -1; grid-row: 2; justify-self: stretch; padding-block: 12px 24px; }
  .ctm-menu-ready .ctm-menu-toggle { display: block; justify-self: end; }
  .ctm-header__inner { grid-template-columns: auto 1fr auto; }
  .ctm-header__actions { justify-self: end; }
  .ctm-menu-ready .ctm-nav { position: absolute; z-index: 99; top: 100%; right: 0; left: 0; display: none; max-height: calc(100svh - 140px); overflow-y: auto; overscroll-behavior: contain; padding: 16px 32px 28px; border-bottom: 1px solid var(--ctm-line-dark); background: var(--ctm-ink); }
  .ctm-menu-ready .ctm-nav.is-open { display: block; }
  .ctm-nav > .ctm-menu { display: grid; gap: 0; justify-content: stretch; }
  .ctm-menu-ready .ctm-nav__socials { display: flex; gap: 10px; margin-top: 16px; padding: 16px 0 0; border-top: 1px solid var(--ctm-line-dark); border-left: 0; }
  .ctm-nav .ctm-menu a { display: block; padding: 15px 0; border-bottom: 1px solid var(--ctm-line-dark); font-size: 11px; overflow-wrap: anywhere; }
  .ctm-nav .ctm-menu .sub-menu { display: block; position: static; min-width: 0; padding: 0 0 0 18px; border: 0; }
  .ctm-topic-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ctm-post-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .woocommerce ul.products { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .ctm-entry-layout { grid-template-columns: minmax(0,1fr); }
  .ctm-entry-aside { display: none; }
  .ctm-entry-content { grid-column: 1; width: min(100%,var(--ctm-content)); margin-inline: auto; }
}

@media (max-width: 900px) {
  :root { --ctm-shell: min(100% - 40px,1440px); }
  .ctm-hero { grid-template-columns: 1fr; min-height: auto; }
  .ctm-hero__copy { min-height: 650px; }
  .ctm-hero h1 { margin-top: 86px; }
  .ctm-core { width: min(82vw,620px); margin: 28px auto 90px; }
  .ctm-section { padding-block: 100px; }
  .ctm-section-head { grid-template-columns: 1fr; gap: 38px; }
  .ctm-lens-grid { grid-template-columns: 1fr; }
  .ctm-manifesto__inner { min-height: 760px; }
  .ctm-method__inner,
  .ctm-cta { grid-template-columns: 1fr; gap: 70px; }
  .ctm-footer__inner { grid-template-columns: 1fr 1fr; }
  .ctm-footer__meta { justify-self: start; text-align: left; }
}

@media (min-width: 601px) and (max-width: 782px) {
  .admin-bar .ctm-header { top: 46px; }
}
@media (max-width: 600px) {
  .admin-bar .ctm-header { top: 0; }
}

@media (max-width: 620px) {
  :root { --ctm-shell: min(100% - 32px,1440px); }
  .ctm-header__inner { min-height: 74px; }
  .ctm-brand__name { display: none; }
  .ctm-account-link { display: none; }
  .ctm-header__actions { gap: 5px; }
  .ctm-header__telegram-mark,
  .ctm-header__youtube-mark { width: 29px; height: 29px; }
  .ctm-menu-ready .ctm-nav { padding-inline: 16px; }
  .ctm-hero { padding-top: 34px; }
  .ctm-hero__copy { min-height: 590px; }
  .ctm-hero h1 { margin-top: 80px; font-size: clamp(50px,15.5vw,74px); line-height: .9; }
  .ctm-hero__lead { font-size: 15px; }
  .ctm-hero__actions { align-items: flex-start; flex-direction: column; }
  .ctm-hero__actions .ctm-button { width: 100%; }
  .ctm-hero__foot { flex-direction: column; gap: 6px; }
  .ctm-core { width: calc(100vw - 32px); }
  .ctm-section { padding-block: 82px; }
  .ctm-topic-grid,
  .ctm-post-grid,
  .woocommerce ul.products { grid-template-columns: 1fr; }
  .ctm-topic-card { min-height: 250px; }
  .ctm-manifesto__inner { min-height: 800px; padding-block: 78px; }
  .ctm-manifesto__statement { margin-top: 90px; font-size: clamp(43px,13vw,68px); }
  .ctm-manifesto__note { right: auto; bottom: 52px; grid-template-columns: 1fr; }
  .ctm-method__inner { padding-block: 88px; }
  .ctm-method__list li { grid-template-columns: 42px 1fr; gap: 16px; }
  .ctm-post-card { min-height: 500px; }
  .ctm-archive-hero__meta { flex-direction: column; gap: 8px; }
  .ctm-single-hero h1 { font-size: clamp(47px,13.5vw,72px); }
  .ctm-single-hero__meta { flex-wrap: wrap; }
  .ctm-entry-layout { padding-block: 68px 90px; }
  .ctm-entry-content { font-size: 17px; }
  .ctm-page-content { width: calc(100% - 32px); }
  .ctm-entry-content blockquote { margin-inline: 0; padding-left: 22px; }
  .alignwide { width: calc(100vw - 32px); }
  .ctm-post-nav { grid-template-columns: 1fr; }
  .ctm-footer__inner { grid-template-columns: 1fr; align-items: start; }
  .ctm-footer__meta { justify-self: start; }
  .woocommerce div.product .product_title { font-size: 44px; }
}
