:root {
  color-scheme: dark;
  --bg: #050505;
  --panel: #111111;
  --panel-strong: #171717;
  --text: #f5f5f0;
  --muted: #aaa69b;
  --soft: #73706a;
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.22);
  --yellow: #fff200;
  --cyan: #56d7d2;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 0 0, rgba(255, 242, 0, 0.08), transparent 28rem),
    linear-gradient(180deg, #050505 0%, #0b0b0b 42%, #050505 100%);
  color: var(--text);
  font-family: Inter, "Segoe UI", Verdana, Tahoma, sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image: linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 32px 32px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

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

img,
iframe,
object,
embed {
  max-width: 100%;
}

svg {
  width: 1em;
  height: 1em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.hero {
  position: relative;
  height: min(720px, calc(100svh - 84px));
  min-height: 620px;
  overflow: hidden;
  padding: 22px clamp(18px, 4vw, 48px) 72px;
  background:
    linear-gradient(90deg, rgba(5, 5, 5, 0.94) 0%, rgba(5, 5, 5, 0.76) 48%, rgba(5, 5, 5, 0.24) 100%),
    image-set(url("https://iztok.org/themes/iztok/top1.jpg") 1x);
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--line);
}

.hero::before,
.hero::after {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.hero::before {
  top: 0;
  height: 118px;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.94) 0%, rgba(5, 5, 5, 0.86) 58%, rgba(5, 5, 5, 0) 100%);
  backdrop-filter: blur(4px);
}

.hero::after {
  bottom: 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.84) 54%, #050505 100%);
  backdrop-filter: blur(5px);
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, var(--max));
  margin: 0 auto;
  gap: 24px;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-size: 0.94rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line-strong);
  background: rgba(255, 242, 0, 0.1);
  color: var(--yellow);
  font-size: 0.7rem;
}

.topbar nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px 18px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
}

.topbar nav a {
  padding: 8px 0;
}

.topbar nav a:hover,
.side-rail a:hover,
.read-link:hover,
.archive-list a:hover {
  color: var(--yellow);
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 340px);
  align-items: end;
  width: min(100%, var(--max));
  min-height: 500px;
  margin: 0 auto;
  gap: clamp(32px, 8vw, 96px);
}

.hero-copy {
  max-width: 740px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.hero h1 {
  margin-bottom: 22px;
  font-size: 8rem;
  line-height: 0.84;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero p {
  max-width: 650px;
  margin-bottom: 30px;
  color: #d8d5ca;
  font-size: 1.32rem;
}

.hero-actions,
.article-actions,
.pagination,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button,
.pagination a,
.read-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  padding: 0 16px;
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
}

.button.primary {
  border-color: var(--yellow);
  background: var(--yellow);
  color: #080808;
}

.button.ghost,
.pagination a,
.read-link {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.button:hover,
.pagination a:hover {
  transform: translateY(-1px);
}

.hero-stats {
  display: grid;
  gap: 10px;
  margin: 0;
}

.hero-stats div {
  border-left: 2px solid var(--yellow);
  padding: 16px 18px;
  background: rgba(0, 0, 0, 0.58);
  box-shadow: var(--shadow);
}

.hero-stats dt {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1;
}

.hero-stats dd {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.content-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
  padding: 52px 0 74px;
  gap: clamp(24px, 4vw, 54px);
}

.side-rail {
  position: sticky;
  top: 18px;
  align-self: start;
  display: grid;
  gap: 22px;
  border-top: 2px solid var(--yellow);
  padding-top: 18px;
}

.side-rail h2 {
  margin-bottom: 9px;
  color: var(--soft);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.side-rail a {
  display: block;
  padding: 7px 0;
  color: #d8d8d0;
  font-size: 0.94rem;
  font-weight: 700;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.section-heading h2,
.archive-year h2,
.comments h2 {
  margin-bottom: 0;
  font-size: 2.45rem;
  line-height: 1;
}

.section-heading p {
  max-width: 390px;
  margin-bottom: 0;
  color: var(--muted);
}

.media-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: -4px 0 18px;
}

.media-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.media-tabs a:hover,
.media-tabs a.active {
  border-color: var(--yellow);
  background: rgba(255, 242, 0, 0.08);
  color: var(--yellow);
}

.media-tabs b {
  color: var(--muted);
  font-size: 0.72rem;
}

.feed {
  display: grid;
  gap: 18px;
}

.post-card {
  overflow: hidden;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

.post-card h3 {
  margin: 0;
  padding: 0 22px 16px;
  font-size: 2.25rem;
  line-height: 1.05;
}

.post-card h3 a:hover {
  color: var(--yellow);
}

.post-meta,
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.post-meta {
  padding: 20px 22px 10px;
}

.legacy-content {
  color: #ddd9cf;
  font-size: 1rem;
  overflow-wrap: break-word;
}

.legacy-content.preview {
  padding: 0 22px 18px;
}

.legacy-content p:last-child,
.legacy-content.preview > :last-child {
  margin-bottom: 0;
}

.legacy-content a {
  color: var(--cyan);
  text-decoration: underline;
  text-decoration-color: rgba(86, 215, 210, 0.4);
  text-underline-offset: 3px;
}

.legacy-content iframe {
  display: block;
  width: 100%;
  max-width: 720px;
  aspect-ratio: 16 / 9;
  height: auto;
  margin: 18px 0;
  border: 1px solid var(--line-strong);
  background: #000;
}

.legacy-content img {
  height: auto;
  border: 1px solid var(--line);
  background: #111;
}

.legacy-insert {
  width: min(100%, var(--media-width, 320px));
  margin: 8px 0 18px;
  border: 1px solid var(--line);
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.legacy-insert.align-right {
  float: right;
  margin-left: 20px;
}

.legacy-insert.align-left {
  float: left;
  margin-right: 20px;
}

.legacy-insert.align-center {
  margin-right: auto;
  margin-left: auto;
}

.legacy-insert img {
  display: block;
  width: 100%;
  border: 0;
}

.legacy-insert figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}

.legacy-download a {
  display: inline-flex;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.06);
}

.read-link {
  width: max-content;
  min-height: 38px;
  margin: 0 22px 22px;
  padding: 0 12px;
  color: var(--yellow);
  font-size: 0.76rem;
}

.pagination {
  justify-content: center;
  padding-top: 18px;
}

.article-hero {
  position: relative;
  overflow: hidden;
  padding: 22px clamp(18px, 4vw, 48px) 70px;
  background:
    linear-gradient(180deg, rgba(5, 5, 5, 0.82), rgba(5, 5, 5, 0.96)),
    url("https://iztok.org/themes/iztok/topbanner_iztok2.jpg");
  background-position: center;
  background-size: cover;
  border-bottom: 1px solid var(--line);
}

.article-hero::before,
.article-hero::after {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
}

.article-hero::before {
  top: 0;
  height: 118px;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0.95) 0%, rgba(5, 5, 5, 0.88) 58%, rgba(5, 5, 5, 0) 100%);
  backdrop-filter: blur(4px);
}

.article-hero::after {
  bottom: 0;
  height: 108px;
  background: linear-gradient(180deg, rgba(5, 5, 5, 0) 0%, rgba(5, 5, 5, 0.84) 54%, #050505 100%);
  backdrop-filter: blur(5px);
}

.article-hero.compact {
  padding-bottom: 46px;
}

.article-hero-inner {
  position: relative;
  z-index: 1;
  width: min(100%, var(--max));
  min-width: 0;
  margin: 62px auto 0;
}

.article-hero h1 {
  max-width: 920px;
  margin-bottom: 18px;
  font-size: 5.4rem;
  line-height: 0.94;
  letter-spacing: 0;
}

.article-hero p {
  max-width: 580px;
  color: var(--muted);
  font-size: 1.12rem;
}

.back-link {
  display: inline-flex;
  margin-bottom: 18px;
  color: var(--yellow);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 760px) minmax(260px, 360px);
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
  padding: 48px 0 74px;
  gap: clamp(28px, 6vw, 70px);
}

.article-body {
  min-width: 0;
  font-size: 1.06rem;
}

.article-body .intro {
  margin-bottom: 26px;
  border-left: 2px solid var(--yellow);
  padding-left: 18px;
  color: #fff8c6;
  font-size: 1.12rem;
}

.article-actions {
  clear: both;
  margin-top: 34px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.comments {
  align-self: start;
  border-top: 2px solid var(--yellow);
  padding-top: 18px;
}

.comments h2 {
  margin-bottom: 18px;
}

.comment {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
}

.comment-avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--panel-strong);
  color: var(--yellow);
  font-weight: 900;
}

.comment header {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-bottom: 8px;
}

.comment header span {
  color: var(--muted);
  font-size: 0.8rem;
}

.comment p {
  margin-bottom: 0;
  color: #d8d5ca;
}

.comment-composer {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.comment-composer h3 {
  margin-bottom: 8px;
  font-size: 1.15rem;
  text-transform: uppercase;
}

.comment-composer p {
  color: var(--muted);
}

.comment-composer .article-actions {
  margin-top: 16px;
  border-top: 0;
  padding-top: 0;
}

.comment-notice {
  border-left: 2px solid var(--cyan);
  padding-left: 12px;
  color: #d8d5ca;
}

.comment-notice.error {
  border-left-color: #ff5c5c;
}

.comment-notice.success {
  border-left-color: var(--yellow);
}

.archive-page {
  width: min(100% - 36px, 980px);
  margin: 0 auto;
  padding: 46px 0 76px;
}

.archive-year {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 28px;
  border-top: 1px solid var(--line);
  padding: 28px 0;
}

.archive-list {
  display: grid;
  gap: 4px;
}

.archive-list a {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 0;
  color: #e4e1d8;
}

.archive-list time {
  min-width: max-content;
  color: var(--muted);
  font-size: 0.86rem;
}

.account-page {
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
  padding: 48px 0 76px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
}

.account-card {
  border: 1px solid var(--line);
  border-top: 2px solid var(--yellow);
  padding: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035));
  box-shadow: var(--shadow);
}

.account-card h2 {
  margin-bottom: 12px;
  font-size: 2rem;
  line-height: 1;
}

.account-card h3 {
  margin: 24px 0 12px;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.account-card p,
.account-note,
.account-message,
.account-error {
  color: #d8d5ca;
}

.login-card {
  max-width: 560px;
}

.form-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.form-field input {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 0 13px;
  background: rgba(0, 0, 0, 0.48);
  color: var(--text);
  font: inherit;
}

.form-field textarea,
.form-field select {
  min-height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  padding: 12px 13px;
  background: rgba(0, 0, 0, 0.48);
  color: var(--text);
  font: inherit;
}

.form-field textarea {
  resize: vertical;
  line-height: 1.5;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

.account-note {
  margin: 18px 0 0;
}

.account-note a {
  color: var(--yellow);
}

.account-message {
  border-left: 2px solid var(--cyan);
  padding-left: 12px;
}

.account-error {
  border-left: 2px solid #ff5c5c;
  padding-left: 12px;
}

.profile-list,
.summary-stats {
  display: grid;
  gap: 10px;
  margin: 22px 0 0;
}

.profile-list div,
.summary-stats div {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.profile-list dt,
.summary-stats dd {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-list dd,
.summary-stats dt {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.summary-stats {
  gap: 14px;
}

.summary-stats div {
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: end;
}

.summary-stats dt {
  font-size: 2rem;
  line-height: 1;
}

.message-list {
  display: grid;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}

.message-list li {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.message-list span,
.message-list small {
  display: block;
}

.message-list small {
  color: var(--muted);
}

.empty-state {
  color: var(--muted);
}

.admin-page {
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
  padding: 32px 0 76px;
}

.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.admin-tabs a {
  border: 1px solid var(--line);
  padding: 8px 12px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-tabs a:hover,
.admin-tabs a.active {
  border-color: rgba(255, 242, 0, 0.7);
  color: var(--yellow);
}

.admin-dashboard,
.admin-split,
.admin-editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 24px;
}

.admin-split,
.admin-editor-grid {
  align-items: start;
  margin-top: 24px;
}

.admin-panel {
  border: 1px solid var(--line);
  border-top: 2px solid var(--yellow);
  padding: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.032));
  box-shadow: var(--shadow);
}

.admin-panel h2 {
  margin-bottom: 12px;
  font-size: 1.9rem;
  line-height: 1;
}

.admin-panel p {
  color: #d8d5ca;
}

.admin-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.admin-panel-head h2 {
  margin-bottom: 0;
}

.admin-panel-head > a:not(.button) {
  color: var(--yellow);
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.button.compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 0.76rem;
}

.admin-stats {
  margin-top: 12px;
}

.admin-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 18px;
}

.admin-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-filters a {
  border: 1px solid var(--line);
  padding: 9px 11px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-filters a.active,
.admin-filters a:hover {
  border-color: rgba(255, 242, 0, 0.65);
  color: var(--yellow);
}

.admin-search {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-search input {
  min-height: 38px;
  border: 1px solid var(--line-strong);
  padding: 0 12px;
  background: rgba(0, 0, 0, 0.45);
  color: var(--text);
  font: inherit;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.admin-table th,
.admin-table td {
  border-top: 1px solid var(--line);
  padding: 12px 10px;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-title-link {
  display: block;
  color: var(--text);
  font-weight: 900;
}

.admin-title-link:hover,
.admin-row-actions a:hover,
.admin-comments a:hover,
.admin-mini-link:hover {
  color: var(--yellow);
}

.admin-table small,
.admin-comments small,
.tool-tile small {
  display: block;
  color: var(--muted);
}

.status-pill {
  display: inline-flex;
  border: 1px solid var(--line);
  padding: 3px 7px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-pill.visible {
  border-color: rgba(86, 215, 210, 0.5);
  color: var(--cyan);
}

.status-pill.hidden {
  border-color: rgba(255, 242, 0, 0.45);
  color: var(--yellow);
}

.admin-row-actions {
  min-width: 132px;
}

.admin-row-actions a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-editor {
  min-width: 0;
}

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

.admin-preview {
  position: sticky;
  top: 18px;
}

.admin-preview code {
  color: var(--yellow);
}

.admin-comments {
  margin-top: 0;
}

.admin-comments li {
  position: relative;
}

.admin-comments p {
  margin: 7px 0 4px;
}

.admin-mini-link {
  display: inline-flex;
  margin-top: 8px;
  color: var(--yellow);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.tool-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.tool-tile {
  border: 1px solid var(--line);
  padding: 16px;
  background: rgba(0, 0, 0, 0.2);
}

.tool-tile span {
  display: block;
  color: var(--text);
  font-weight: 900;
}

.tool-tile:hover {
  border-color: rgba(255, 242, 0, 0.6);
}

.admin-flash {
  border-left: 2px solid var(--cyan);
  margin-bottom: 18px;
  padding: 10px 12px;
  background: rgba(86, 215, 210, 0.08);
  color: #d8d5ca;
}

.admin-flash.error {
  border-left-color: #ff5c5c;
  background: rgba(255, 92, 92, 0.08);
}

.admin-flash.success {
  border-left-color: var(--yellow);
  background: rgba(255, 242, 0, 0.08);
}

.admin-denied {
  max-width: 680px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 36px, var(--max));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 24px 0 34px;
  color: var(--muted);
  font-size: 0.86rem;
}

.site-footer p {
  margin-bottom: 0;
}

.site-footer a:hover {
  color: var(--yellow);
}

@media (max-width: 880px) {
  .hero {
    height: auto;
    min-height: auto;
  }

  .hero-inner,
  .content-grid,
  .article-layout,
  .archive-year,
  .account-grid,
  .admin-dashboard,
  .admin-split,
  .admin-editor-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    min-height: auto;
    padding: 86px 0 0;
  }

  .hero h1 {
    font-size: 6rem;
  }

  .hero p {
    font-size: 1.18rem;
  }

  .article-hero h1 {
    font-size: 4.2rem;
  }

  .hero-stats {
    grid-template-columns: repeat(3, 1fr);
  }

  .side-rail {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 620px) {
  .hero,
  .article-hero {
    padding-right: 16px;
    padding-left: 16px;
  }

  .hero-inner {
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .article-hero-inner {
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .article-hero p {
    width: min(100%, 33ch);
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .article-hero::before {
    height: 230px;
  }

  .article-hero::after {
    height: 118px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
    max-width: calc(100vw - 32px);
  }

  .topbar nav {
    width: 100%;
    justify-content: flex-start;
  }

  .hero h1 {
    max-width: 100%;
    font-size: 3.2rem;
  }

  .hero-stats,
  .side-rail {
    grid-template-columns: 1fr;
  }

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

  .topbar nav a {
    border: 1px solid var(--line);
    padding: 8px;
    text-align: center;
    font-size: 0.76rem;
  }

  .hero p {
    max-width: 31ch;
    font-size: 1.08rem;
  }

  .hero-stats dt {
    font-size: 2.25rem;
  }

  .section-heading h2,
  .archive-year h2,
  .comments h2 {
    font-size: 1.7rem;
  }

  .post-card h3 {
    font-size: 1.55rem;
  }

  .article-hero h1 {
    font-size: 3.1rem;
  }

  .content-grid,
  .article-layout,
  .archive-page,
  .account-page,
  .site-footer {
    width: min(100% - 28px, var(--max));
  }

  .article-layout {
    width: min(calc(100vw - 30px), 361px);
    margin-right: auto;
    margin-left: 14px;
  }

  .article-body,
  .comments,
  .legacy-content,
  .comment-composer {
    max-width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .account-card {
    max-width: 100%;
    padding: 18px;
  }

  .form-field input {
    width: 100%;
    min-width: 0;
  }

  .form-field textarea,
  .form-field select,
  .admin-search input {
    width: 100%;
    min-width: 0;
  }

  .admin-page {
    width: min(calc(100vw - 30px), 361px);
    margin-right: auto;
    margin-left: 14px;
  }

  .admin-panel {
    padding: 18px;
  }

  .admin-panel-head,
  .admin-toolbar,
  .admin-form-row {
    grid-template-columns: 1fr;
  }

  .admin-panel-head {
    align-items: start;
    flex-direction: column;
  }

  .admin-preview {
    position: static;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .profile-list div,
  .summary-stats div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .post-card h3,
  .post-meta,
  .legacy-content.preview {
    padding-right: 16px;
    padding-left: 16px;
  }

  .read-link {
    margin-left: 16px;
  }

  .legacy-insert.align-left,
  .legacy-insert.align-right {
    float: none;
    margin-right: 0;
    margin-left: 0;
  }

  .archive-list a {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
