:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #eaf1f3;
  --text: #172a34;
  --muted: #647984;
  --line: #d7e1e5;
  --accent: #197b78;
  --accent-strong: #0d625f;
  --signal: #e4a33b;
  --shadow: 0 18px 50px rgba(32, 58, 68, 0.09);
  --max-width: 1240px;
}

html[data-theme="dark"] {
  --bg: #101719;
  --surface: #172124;
  --surface-soft: #1e2c30;
  --text: #edf4f4;
  --muted: #9db0b4;
  --line: #2c3c40;
  --accent: #55b8b1;
  --accent-strong: #81d4ce;
  --signal: #efb75b;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  letter-spacing: 0;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

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

img {
  max-width: 100%;
}

textarea,
input,
select {
  color: var(--text);
}

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

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  width: min(var(--max-width), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  gap: 28px;
}

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

.brand img {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  border: 2px solid var(--surface);
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 4px 14px rgba(26, 67, 77, 0.14);
}

.brand span {
  display: flex;
  min-width: 0;
  flex-direction: column;
  line-height: 1.3;
}

.brand strong {
  font-size: 16px;
}

.brand small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  align-items: center;
  margin-left: auto;
  gap: 4px;
}

.main-nav a {
  position: relative;
  padding: 24px 14px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.main-nav a::after {
  position: absolute;
  right: 14px;
  bottom: 15px;
  left: 14px;
  height: 2px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scaleX(0.3);
  transition: 180ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--text);
}

.main-nav a:hover::after,
.main-nav a.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  gap: 5px;
}

.icon-button {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
}

.icon-button:hover {
  background: var(--surface-soft);
}

.menu-button {
  display: none;
  margin-left: auto;
}

.search-panel {
  position: fixed;
  z-index: 45;
  top: 72px;
  right: 0;
  left: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.search-panel-inner {
  width: min(720px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0;
}

.search-panel label {
  display: block;
  margin-bottom: 9px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.search-box {
  display: flex;
  align-items: center;
  height: 54px;
  padding: 0 12px 0 18px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--bg);
  gap: 12px;
}

.search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 16px;
}

.search-box button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
}

.intro-band {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.intro-inner {
  display: grid;
  width: min(var(--max-width), calc(100% - 40px));
  min-height: 480px;
  margin: 0 auto;
  align-items: center;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 52px;
}

.intro-copy {
  padding: 64px 0;
}

.eyebrow,
.section-kicker,
.sidebar-label {
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.intro-copy h1 {
  max-width: 550px;
  margin: 14px 0 20px;
  font-size: clamp(38px, 4.2vw, 62px);
  line-height: 1.14;
}

.intro-copy > p {
  max-width: 580px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.intro-actions {
  display: flex;
  align-items: center;
  margin-top: 30px;
  gap: 22px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 20px;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  gap: 14px;
}

.primary-button:hover {
  background: var(--accent-strong);
}

.text-link {
  color: var(--text);
  font-size: 14px;
  font-weight: 750;
}

.intro-facts {
  display: flex;
  margin-top: 40px;
  color: var(--muted);
  font-size: 12px;
  gap: 22px;
}

.intro-facts span {
  padding-right: 22px;
  border-right: 1px solid var(--line);
}

.intro-facts span:last-child {
  padding-right: 0;
  border-right: 0;
}

.intro-facts strong {
  display: block;
  color: var(--text);
  font-size: 16px;
}

.intro-media {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.intro-media::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.intro-media img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.category-bar {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.category-inner {
  display: flex;
  width: min(var(--max-width), calc(100% - 40px));
  min-height: 64px;
  margin: 0 auto;
  align-items: center;
  overflow-x: auto;
  gap: 8px;
  scrollbar-width: none;
}

.category-inner::-webkit-scrollbar {
  display: none;
}

.filter-button {
  flex: 0 0 auto;
  padding: 8px 13px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.filter-button:hover,
.filter-button.active {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--text);
}

.page-layout {
  display: grid;
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 58px 0 90px;
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 48px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-bottom: 26px;
  gap: 20px;
}

.section-heading h2 {
  margin: 5px 0 0;
  font-size: 28px;
  line-height: 1.25;
}

.section-heading > p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

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

.post-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  transition: 180ms ease;
}

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

.post-cover {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--surface-soft);
}

.post-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.post-card:hover .post-cover img {
  transform: scale(1.025);
}

.post-body {
  padding: 22px;
}

.post-category {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.post-body h3 {
  margin: 13px 0 10px;
  font-size: 20px;
  line-height: 1.42;
}

.post-body h3 a:hover {
  color: var(--accent);
}

.post-body > p {
  display: -webkit-box;
  min-height: 52px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 14px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.post-meta {
  display: flex;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11px;
  gap: 14px;
}

.sidebar {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-section {
  border-top: 3px solid var(--text);
  background: var(--surface);
  padding: 22px;
}

.profile-block {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.profile-block img {
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  border-radius: 50%;
  object-fit: cover;
}

.profile-block h2 {
  margin: 5px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.profile-block p {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 12px;
}

.profile-block a {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.sidebar-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.sidebar-title h2 {
  margin: 0;
  font-size: 17px;
}

.sidebar-title span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 850;
}

.popular-item {
  display: grid;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  grid-template-columns: 56px 1fr;
  gap: 12px;
}

.popular-item:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.popular-item img {
  width: 56px;
  height: 56px;
  border-radius: 4px;
  object-fit: cover;
}

.popular-item strong {
  display: block;
  font-size: 12px;
  line-height: 1.45;
}

.popular-item small {
  color: var(--muted);
  font-size: 10px;
}

.resource-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.resource-list a {
  display: flex;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 720;
  gap: 10px;
}

.resource-list a:hover {
  border-color: var(--accent);
}

.resource-list span {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 850;
}

.newsletter h2 {
  margin: 6px 0 8px;
  font-size: 19px;
  line-height: 1.35;
}

.newsletter p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 80px 20px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  background: var(--surface);
  text-align: center;
}

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

.site-footer {
  display: flex;
  width: min(var(--max-width), calc(100% - 40px));
  min-height: 150px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  gap: 30px;
}

.site-footer p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.footer-links {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  gap: 20px;
}

.article-page {
  display: grid;
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 70px 0 100px;
  align-items: start;
  grid-template-columns: minmax(0, 760px) 260px;
  gap: 70px;
}

.article-header {
  margin-bottom: 38px;
}

.article-header h1 {
  margin: 14px 0 18px;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.2;
}

.article-lead {
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.article-meta {
  display: flex;
  margin-top: 20px;
  color: var(--muted);
  font-size: 12px;
  gap: 18px;
}

.article-hero {
  width: 100%;
  margin: 0 0 42px;
  border-radius: 7px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.article-section {
  scroll-margin-top: 100px;
  margin: 0 0 42px;
}

.article-section h2 {
  margin: 0 0 15px;
  font-size: 27px;
  line-height: 1.35;
}

.article-section p,
.article-section li {
  color: color-mix(in srgb, var(--text) 82%, var(--muted));
  font-size: 16px;
  line-height: 1.9;
}

.article-section p {
  margin: 0 0 16px;
}

.article-section ul {
  margin: 0;
  padding-left: 22px;
}

.article-note {
  margin: 44px 0;
  padding: 22px 24px;
  border-left: 4px solid var(--accent);
  background: var(--surface-soft);
  color: var(--text);
}

.video-embed {
  position: relative;
  width: 100%;
  margin: 36px 0 44px;
  overflow: hidden;
  border-radius: 8px;
  background: #0b1113;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
}

.video-embed iframe,
.video-embed video {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
}

.external-video-link {
  display: inline-flex;
  margin: 30px 0;
  color: var(--accent);
  font-weight: 800;
}

.article-quote {
  margin: 38px 0;
  padding: 22px 26px;
  border-left: 4px solid var(--signal);
  background: var(--surface-soft);
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
}

.article-sidebar {
  position: sticky;
  top: 106px;
}

.toc,
.author-card {
  padding: 22px;
  border-top: 3px solid var(--text);
  background: var(--surface);
}

.toc nav {
  display: flex;
  flex-direction: column;
  margin-top: 14px;
  gap: 4px;
}

.toc a {
  padding: 7px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.toc a:hover {
  color: var(--accent);
}

.author-card {
  margin-top: 22px;
  text-align: center;
}

.author-card img {
  width: 72px;
  height: 72px;
  border-radius: 50%;
}

.author-card strong {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}

.author-card p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.related-section {
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.related-inner {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 60px 0 80px;
}

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

.about-page {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 80px 0 110px;
}

.about-intro {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 340px;
  gap: 80px;
}

.about-intro h1 {
  margin: 14px 0 24px;
  font-size: clamp(42px, 5.5vw, 68px);
  line-height: 1.18;
}

.about-intro p {
  max-width: 650px;
  color: var(--muted);
  font-size: 18px;
}

.about-intro img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.story-grid {
  display: grid;
  margin-top: 90px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.story-grid article {
  min-height: 260px;
  padding: 30px;
  border-top: 3px solid var(--accent);
  background: var(--surface);
}

.story-grid span {
  color: var(--signal);
  font-size: 13px;
  font-weight: 850;
}

.story-grid h2 {
  margin: 30px 0 14px;
  font-size: 23px;
}

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

.manifesto {
  margin-top: 80px;
  padding: 64px;
  background: var(--text);
  color: var(--bg);
}

.manifesto blockquote {
  max-width: 850px;
  margin: 16px 0 34px;
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.35;
}

/* Content studio */
.admin-body {
  min-height: 100vh;
}

.admin-nav a {
  padding-inline: 12px;
}

.admin-layout {
  display: grid;
  width: min(1460px, calc(100% - 36px));
  min-height: calc(100vh - 72px);
  margin: 0 auto;
  grid-template-columns: 320px minmax(0, 1fr);
}

.admin-list-panel {
  padding: 30px 24px 50px 4px;
  border-right: 1px solid var(--line);
}

.admin-panel-heading,
.editor-toolbar,
.field-label-row,
.editor-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.admin-panel-heading h1 {
  margin: 2px 0 0;
  font-size: 25px;
}

.compact-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 0;
  cursor: pointer;
  font-size: 13px;
}

.admin-filter-row {
  display: flex;
  margin: 24px 0 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.admin-filter,
.video-tab {
  flex: 1;
  min-height: 36px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.admin-filter.active,
.video-tab.active {
  background: var(--surface-soft);
  color: var(--accent-strong);
}

.admin-post-list {
  display: grid;
  gap: 8px;
}

.admin-post-item {
  display: grid;
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  gap: 5px;
  text-align: left;
}

.admin-post-item:hover,
.admin-post-item.active {
  border-color: var(--accent);
}

.admin-post-item strong {
  overflow: hidden;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-post-item small {
  color: var(--muted);
  font-size: 11px;
}

.admin-post-status {
  width: max-content;
  color: #8b651c;
  font-size: 10px;
  font-weight: 900;
}

.admin-post-status.published {
  color: var(--accent-strong);
}

.admin-empty,
.admin-local-note {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 7px;
  color: var(--muted);
  font-size: 13px;
}

.admin-empty p,
.admin-local-note p {
  margin: 5px 0 0;
}

.admin-local-note {
  margin-top: 22px;
  background: color-mix(in srgb, var(--signal) 8%, var(--surface));
}

.admin-local-note strong {
  color: var(--text);
}

.backup-actions {
  display: grid;
  margin-top: 14px;
  gap: 8px;
}

.backup-actions .secondary-button {
  width: 100%;
  min-height: 38px;
  padding: 7px 10px;
  font-size: 12px;
}

.editor-panel {
  padding: 0 0 80px 38px;
}

#postForm {
  width: min(100%, 980px);
  margin: 0 auto;
}

.editor-toolbar {
  position: sticky;
  z-index: 30;
  top: 72px;
  min-height: 68px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 94%, transparent);
  backdrop-filter: blur(12px);
  color: var(--muted);
  font-size: 13px;
}

.editor-toolbar > div:first-child {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
}

.status-dot.saved {
  background: var(--accent);
}

.editor-actions {
  display: flex;
  gap: 8px;
}

.secondary-button,
.danger-button {
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.danger-button {
  border-color: #d5a1a1;
  color: #a43e3e;
}

.editor-section {
  margin-top: 28px;
}

.editor-two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 900;
}

.field-label span {
  margin-left: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.editor-section input,
.editor-section textarea,
.editor-section select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  outline: 0;
  background: var(--surface);
}

.editor-section input,
.editor-section select {
  min-height: 48px;
  padding: 0 14px;
}

.editor-section textarea {
  padding: 13px 14px;
  resize: vertical;
}

.editor-section input:focus,
.editor-section textarea:focus,
.editor-section select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent);
}

.title-input {
  min-height: 58px !important;
  font-size: 21px;
  font-weight: 800;
}

.upload-zone {
  position: relative;
  display: grid;
  min-height: 180px;
  overflow: hidden;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  place-items: center;
}

.upload-zone input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.upload-zone label {
  z-index: 1;
  display: grid;
  padding: 30px;
  cursor: pointer;
  place-items: center;
  text-align: center;
}

.upload-zone label small {
  margin-top: 4px;
  color: var(--muted);
}

.upload-icon {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 28px;
}

.upload-zone img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-source-tabs {
  display: flex;
  width: min(100%, 430px);
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.video-mode-panel {
  display: none;
}

.video-mode-panel.active {
  display: block;
}

.field-help {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.compact-upload {
  min-height: 130px;
}

#videoPreview {
  width: 100%;
  max-height: 440px;
  margin-top: 14px;
  border-radius: 8px;
  background: #0b1113;
}

.format-hints {
  display: flex;
  gap: 6px;
}

.format-hints button {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.body-editor {
  min-height: 460px;
  line-height: 1.8;
}

.editor-danger-zone {
  margin-top: 44px;
  padding: 20px;
  border: 1px solid #e1baba;
  border-radius: 7px;
  background: color-mix(in srgb, #b64040 5%, var(--surface));
}

.editor-danger-zone p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.preview-dialog {
  width: min(860px, calc(100% - 28px));
  max-height: 88vh;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.preview-dialog::backdrop {
  background: rgba(8, 18, 22, 0.68);
}

.preview-dialog-header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.preview-dialog-header button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 5px;
  background: var(--surface-soft);
  color: var(--text);
  cursor: pointer;
  font-size: 22px;
}

.preview-article {
  padding: 34px clamp(20px, 6vw, 62px) 60px;
}

.preview-article h1 {
  margin: 12px 0;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.2;
}

/* Tutorial */
.tutorial-page {
  width: min(920px, calc(100% - 36px));
  margin: 0 auto;
  padding: 64px 0 90px;
}

.tutorial-page > header {
  max-width: 760px;
  margin-bottom: 44px;
}

.tutorial-page h1 {
  margin: 10px 0 18px;
  font-size: clamp(38px, 6vw, 64px);
  line-height: 1.08;
}

.tutorial-page > header p {
  color: var(--muted);
  font-size: 18px;
}

.tutorial-step {
  display: grid;
  padding: 30px 0;
  border-top: 1px solid var(--line);
  grid-template-columns: 88px 1fr;
  gap: 24px;
}

.tutorial-step > span {
  color: var(--accent);
  font-size: 25px;
  font-weight: 900;
}

.tutorial-step h2 {
  margin: 0 0 9px;
  font-size: 23px;
}

.tutorial-step p,
.tutorial-step li {
  color: var(--muted);
}

.tutorial-step ul,
.tutorial-step ol {
  padding-left: 20px;
}

.tutorial-callout {
  margin-top: 40px;
  padding: 26px;
  border-left: 4px solid var(--signal);
  background: var(--surface);
}

@media (max-width: 1000px) {
  .intro-inner {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .intro-copy {
    padding-bottom: 44px;
  }

  .intro-media {
    margin-bottom: 55px;
  }

  .page-layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-block,
  .newsletter {
    grid-column: span 2;
  }

  .article-page {
    grid-template-columns: 1fr;
  }

  .article-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .author-card {
    margin-top: 0;
  }

  .admin-layout {
    width: min(100% - 28px, var(--max-width));
    grid-template-columns: 1fr;
  }

  .admin-list-panel {
    padding: 26px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .editor-panel {
    padding: 0 0 70px;
  }
}

@media (max-width: 760px) {
  .header-inner {
    min-height: 64px;
  }

  .brand {
    min-width: 0;
    flex: 1;
  }

  .brand img {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .brand small {
    max-width: 190px;
  }

  .menu-button {
    display: grid;
  }

  .main-nav {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    display: none;
    padding: 10px 20px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .main-nav.open {
    display: flex;
    align-items: stretch;
    flex-direction: column;
  }

  .main-nav a {
    padding: 12px 2px;
  }

  .main-nav a::after {
    display: none;
  }

  .header-actions {
    gap: 0;
  }

  .intro-inner,
  .page-layout,
  .category-inner,
  .site-footer,
  .about-page,
  .article-page,
  .related-inner {
    width: min(100% - 28px, var(--max-width));
  }

  .admin-layout,
  .tutorial-page {
    width: min(100% - 28px, var(--max-width));
  }

  .intro-copy {
    padding: 48px 0 36px;
  }

  .intro-copy h1 {
    font-size: 40px;
  }

  .intro-facts {
    overflow-x: auto;
  }

  .intro-facts span {
    min-width: 110px;
  }

  .intro-media {
    margin-bottom: 38px;
  }

  .page-layout {
    padding-top: 42px;
  }

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

  .sidebar {
    display: flex;
  }

  .profile-block,
  .newsletter {
    grid-column: auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 38px 0;
  }

  .article-page {
    padding-top: 48px;
  }

  .article-header h1 {
    font-size: 38px;
  }

  .article-sidebar {
    grid-template-columns: 1fr;
  }

  .about-intro {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .about-intro img {
    width: min(100%, 380px);
  }

  .story-grid {
    grid-template-columns: 1fr;
    margin-top: 55px;
  }

  .manifesto {
    margin-top: 50px;
    padding: 38px 26px;
  }
}

@media (max-width: 430px) {
  .brand strong {
    font-size: 14px;
  }

  .brand small {
    display: none;
  }

  .header-actions .icon-button:first-child {
    display: none;
  }

  .intro-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-block {
    flex-direction: column;
  }

  .editor-toolbar {
    position: static;
    align-items: stretch;
    flex-direction: column;
  }

  .editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .editor-actions .primary-button {
    grid-column: 1 / -1;
    text-align: center;
  }

  .editor-two-columns {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .field-label-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .format-hints {
    width: 100%;
  }

  .format-hints button {
    flex: 1;
  }

  .tutorial-step {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
