:root {
  --bg: #f4f6f8;
  --bg-elevated: #ffffff;
  --text: #121417;
  --muted: #6b7280;
  --line: #e2e6ec;
  --accent: #123a6d;
  --accent-soft: #e8eef6;
  --radius: 4px;
  --wrap: 1080px;
  --font-ui: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --font-display: "Newsreader", Georgia, serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-ui);
  background:
    radial-gradient(1200px 420px at 10% -10%, #d9e4f2 0%, transparent 55%),
    radial-gradient(900px 360px at 90% 0%, #e4ebf4 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a:hover { color: #0c2749; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.wrap--wide {
  max-width: 1400px;
}

.page { min-height: 100vh; display: flex; flex-direction: column; }
.main {
  flex: 1;
  width: 100%;
  padding-top: 32px;
  padding-bottom: 72px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.75));
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    "brand brand"
    "nav search";
  gap: 14px 24px;
  padding-top: 18px;
  padding-bottom: 16px;
  align-items: center;
}

.brand {
  grid-area: brand;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: inherit;
}

.brand:hover { color: inherit; text-decoration: none; }

.brand-name {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.brand-tag {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.nav {
  grid-area: nav;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  align-items: center;
}

.nav a {
  color: var(--text);
  font-weight: 560;
  font-size: 0.95rem;
  position: relative;
  padding: 4px 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a:hover::after,
.nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--accent); font-weight: 700; }

.nav-admin {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  border-radius: 10px;
  color: var(--muted) !important;
  background: transparent;
  border: 1px solid transparent;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.nav-admin::after { display: none !important; }

.nav-admin:hover {
  color: var(--accent) !important;
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 16%, var(--line));
  text-decoration: none;
}

.nav-admin.is-active {
  color: var(--accent) !important;
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
}

.nav-admin__icon {
  display: block;
  flex: 0 0 auto;
}

.search {
  grid-area: search;
  display: flex;
  gap: 8px;
  justify-self: end;
  min-width: min(280px, 100%);
}

.search input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  font: inherit;
  font-size: 0.92rem;
}

.search input:focus {
  outline: 2px solid var(--accent-soft);
  border-color: #9bb4d4;
}

.search button,
button,
.btn {
  padding: 10px 14px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
}

.btn-more {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-more:hover {
  background: var(--bg-elevated);
  border-color: #c5ced9;
  color: var(--text);
  text-decoration: none;
}

/* Sections */
.section {
  margin-bottom: 48px;
  padding-bottom: 8px;
}

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

.section-head--news {
  border-bottom-color: transparent;
  position: relative;
  padding-bottom: 18px;
}

.section-head--news::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-head__label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.section-kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 1.9rem);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.section-link {
  font-size: 0.92rem;
  font-weight: 600;
  white-space: nowrap;
}

.section-link:hover { text-decoration: underline; }

.section-link--arrow::after {
  content: " →";
  transition: transform 0.2s ease;
  display: inline-block;
}

.section-link--arrow:hover::after {
  transform: translateX(3px);
}

.section-more {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.empty-hint {
  color: var(--muted);
  margin: 0;
}

.meta {
  color: var(--muted);
  font-size: 0.86rem;
  margin: 0 0 6px;
}

.img-placeholder {
  width: 100%;
  height: 100%;
  min-height: 160px;
  background: linear-gradient(135deg, #d8e0ea, #eef2f6);
}

/* News list — compact */
.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.news-list > li { border-bottom: 1px solid var(--line); }

.news-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 12px 14px;
  align-items: center;
  padding: 10px 0;
  color: inherit;
  transition: background 0.15s ease;
}

.news-row--no-thumb {
  grid-template-columns: minmax(0, 1fr);
}

.news-row:hover {
  background: rgba(255, 255, 255, 0.45);
}

.news-row__main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.news-title {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  text-decoration: none;
  transition: color 0.15s ease;
}

.news-row:hover .news-title,
a.news-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.3;
}

.news-meta span::before,
.news-meta a.news-cat::before {
  content: "·";
  margin-right: 10px;
  color: #b0b7c2;
}

.news-meta a.news-cat {
  color: var(--muted);
  text-decoration: none;
}

.news-meta a.news-cat:hover {
  color: var(--accent);
  text-decoration: underline;
}

.news-thumb {
  display: block;
  width: 96px;
  height: 64px;
  overflow: hidden;
  border-radius: 6px;
  background: #dde3eb;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.news-row:hover .news-thumb img { transform: scale(1.05); }

/* List / detail pages */
.page-head {
  margin-bottom: 28px;
}

.page-head .page-title,
.page-head .section-title {
  font-size: clamp(1.7rem, 3vw, 2.1rem);
}

.page-head__count {
  margin: 0;
  align-self: center;
}

.section-head--articles::after,
.section-head--foto::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-head--articles,
.section-head--foto {
  border-bottom-color: transparent;
  position: relative;
  padding-bottom: 18px;
}

.list-news {
  max-width: none;
}

.list-articles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 22px;
}

.list-article {
  display: flex;
  flex-direction: column;
  color: inherit;
  min-width: 0;
}

.list-article:hover {
  color: inherit;
  text-decoration: none;
}

.list-article__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-radius: 10px;
  background: #dde3eb;
}

.list-article__media img,
.list-article__media .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.list-article:hover .list-article__media img { transform: scale(1.04); }

.list-article__body {
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.list-article__body h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.28;
  min-height: calc(1.28em * 3);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.15s ease;
}

.list-article:hover .list-article__body h2 { color: var(--accent); }

.list-foto {
  display: grid;
  gap: 14px;
}

.list-foto--home {
  grid-template-columns: 1.45fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(170px, 210px));
}

.list-foto--page {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.list-foto__item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #1a2330;
  color: #fff;
  min-height: 0;
}

.list-foto--page .list-foto__item {
  aspect-ratio: 16 / 11;
}

.list-foto__item:hover { color: #fff; text-decoration: none; }

.list-foto__item--lead {
  min-height: 100%;
}

.list-foto--home .list-foto__item--lead {
  grid-row: 1 / span 2;
}

.list-foto--page .list-foto__item--lead {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
  min-height: 280px;
}

.list-foto__media {
  position: absolute;
  inset: 0;
}

.list-foto__media img,
.list-foto__media .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.list-foto__item:hover .list-foto__media img { transform: scale(1.05); }

.list-foto__meta {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 32px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(transparent, rgba(10, 16, 24, 0.82));
  z-index: 1;
}

.list-foto__meta time {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
}

.list-foto__caption {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.25;
}

.list-foto__item--lead .list-foto__caption {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.pager {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

.pager-link {
  font-weight: 600;
}

.pager-status {
  min-width: 7rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.detail {
  max-width: 760px;
}

.detail-back { margin-bottom: 14px; }

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.2vw, 2.35rem);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.preview {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  margin: 0 0 24px;
  border-radius: 12px;
  background: #dde3eb;
}

.content {
  font-size: 1.08rem;
  line-height: 1.65;
}

.content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

img {
  max-width: 100%;
}

.content p { margin: 0 0 1em; }

/* Admin */
.admin-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}

.admin-live {
  margin: 6px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.admin-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f7a3f;
  box-shadow: 0 0 0 0 rgba(31, 122, 63, 0.45);
  animation: livePulse 1.8s ease-out infinite;
}

.admin-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.count-pill {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.78)),
    var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.9rem;
  position: relative;
  overflow: hidden;
}

.count-pill::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--job-accent, var(--accent));
}

.count-pill--news { --job-accent: #123a6d; }
.count-pill--articles { --job-accent: #0f6a62; }
.count-pill--foto { --job-accent: #a15a12; }

.count-pill span { color: var(--muted); font-weight: 560; }
.count-pill strong {
  font-variant-numeric: tabular-nums;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  color: var(--job-accent, var(--text));
}

.admin-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  margin: 0;
  padding: 12px 14px;
  border-radius: 10px;
  background: #e7f0e4;
  border: 1px solid #b7d0ae;
  font-size: 0.92rem;
  box-shadow: 0 10px 30px rgba(18, 20, 23, 0.12);
  animation: fadeUp 0.25s ease both;
}

.admin-toast--err {
  background: #f8e6e6;
  border-color: #e0b4b4;
}

.admin-jobs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.job-card {
  --job-accent: var(--accent);
  --job-soft: var(--accent-soft);
  --job-glow: rgba(18, 58, 109, 0.14);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(165deg, rgba(255,255,255,0.96) 0%, rgba(248,250,252,0.92) 100%);
  border: 1px solid color-mix(in srgb, var(--job-accent) 18%, var(--line));
  border-radius: 16px;
  padding: 18px;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 12px 28px rgba(18, 20, 23, 0.04);
  animation: fadeUp 0.45s ease both;
  animation-delay: var(--delay, 0ms);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 18px 36px rgba(18, 20, 23, 0.08);
}

.job-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--job-accent), color-mix(in srgb, var(--job-accent) 30%, white));
  z-index: 1;
}

.job-card__glow {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -48px;
  top: -56px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--job-glow), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.job-card > *:not(.job-card__glow) { position: relative; z-index: 1; }

.job-card--news {
  --job-accent: #123a6d;
  --job-soft: #e8eef6;
  --job-glow: rgba(18, 58, 109, 0.16);
}

.job-card--articles {
  --job-accent: #0f6a62;
  --job-soft: #e4f3f1;
  --job-glow: rgba(15, 106, 98, 0.16);
}

.job-card--sarinfoto {
  --job-accent: #a15a12;
  --job-soft: #f7ecdf;
  --job-glow: rgba(161, 90, 18, 0.16);
}

.job-card[data-status="running"] {
  border-color: color-mix(in srgb, var(--job-accent) 34%, #7bc48c);
}

.job-card[data-status="error"] {
  border-color: color-mix(in srgb, #b42318 40%, var(--line));
}

.job-card__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.job-card__kicker {
  margin: 0 0 4px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--job-accent);
}

.job-card__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.job-card__error {
  margin: 8px 0 0;
  color: #b42318;
  max-width: 42rem;
  word-break: break-word;
  font-size: 0.84rem;
}

.job-card__error:empty { display: none; }

.job-card__hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.job-card__metric,
.job-card__status-wrap {
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--job-soft) 70%, white);
  border: 1px solid color-mix(in srgb, var(--job-accent) 10%, transparent);
}

.job-card__metric-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.2rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  color: var(--job-accent);
}

.job-card__progress {
  margin-bottom: 16px;
}

.job-card__progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.job-card__progress-meta .stat-label { margin-bottom: 0; }
.job-card__progress-meta strong {
  font-variant-numeric: tabular-nums;
  font-size: 0.98rem;
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--job-soft) 80%, #d7dee8);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--job-accent), color-mix(in srgb, var(--job-accent) 55%, #7fd0c0));
  transition: width 0.45s ease;
  position: relative;
}

.job-card[data-status="running"] .progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.45) 50%, transparent 70%);
  background-size: 200% 100%;
  animation: progressSheen 1.6s linear infinite;
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 650;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  font-size: 0.9rem;
  text-transform: lowercase;
  font-weight: 650;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.75;
}

.status-pill[data-status="running"] {
  background: #dff5e5;
  color: #146c2e;
}

.status-pill[data-status="running"] .status-dot {
  animation: livePulse 1.4s ease-out infinite;
}

.status-pill[data-status="error"] { background: #fde8e8; color: #b42318; }
.status-pill[data-status="done"] { background: var(--job-soft, #e8eef6); color: var(--job-accent, var(--accent)); }
.status-pill[data-status="paused"],
.status-pill[data-status="idle"] { background: #f3f4f6; color: #4b5563; }

.job-card__controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: end;
  margin-top: auto;
}

.control { min-width: 0; }

.stepper {
  display: inline-flex;
  align-items: center;
  width: 100%;
  border: 1px solid color-mix(in srgb, var(--job-accent) 14%, var(--line));
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.stepper-btn {
  width: 36px;
  height: 38px;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
  flex: 0 0 auto;
}

.stepper-btn:hover { background: var(--job-soft, var(--accent-soft)); }

.stepper input[type="number"] {
  width: 100%;
  min-width: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  height: 38px;
  font: inherit;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}

.stepper input[type="number"]::-webkit-outer-spin-button,
.stepper input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.job-reset {
  width: 100%;
  grid-column: 1 / -1;
  border-radius: 10px;
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.switch input { position: absolute; opacity: 0; pointer-events: none; }

.switch-ui {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  background: #cfd6df;
  position: relative;
  transition: background 0.2s ease;
}

.switch-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.switch input:checked + .switch-ui { background: #1f7a3f; }
.switch input:checked + .switch-ui::after { transform: translateX(20px); }
.switch-label { font-weight: 600; min-width: 2.5rem; }

.flash {
  padding: 10px 12px;
  background: #e7f0e4;
  border: 1px solid #b7d0ae;
  border-radius: var(--radius);
  margin-bottom: 16px;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(31, 122, 63, 0.45); }
  70% { box-shadow: 0 0 0 8px rgba(31, 122, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(31, 122, 63, 0); }
}

@keyframes progressSheen {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (max-width: 900px) {
  .admin-jobs,
  .admin-counts {
    grid-template-columns: 1fr;
  }

  .job-card__controls {
    grid-template-columns: 1fr 1fr;
  }

  .job-reset { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .job-card__hero { grid-template-columns: 1fr; }
  .job-card__controls { grid-template-columns: 1fr; }
  .admin-top { flex-direction: column; }
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 28px;
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer p { margin: 0; }

/* Motion */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.55s ease both;
}

.delay-1 { animation-delay: 0.08s; }
.delay-2 { animation-delay: 0.16s; }

.login-box {
  max-width: 380px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-label {
  display: grid;
  gap: 6px;
  font-size: 0.92rem;
  font-weight: 600;
}

.login-label input {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--bg-elevated);
}

.flash--err {
  background: #f8e6e6;
  border-color: #e0b4b4;
}

@media (min-width: 900px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav search";
  }
}

@media (max-width: 899px) {
  .header-inner {
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "nav"
      "search";
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 12px;
  }

  .nav {
    width: 100%;
    gap: 10px 16px;
  }

  .search {
    width: 100%;
    min-width: 0;
    justify-self: stretch;
  }

  .list-articles {
    grid-template-columns: 1fr 1fr;
    gap: 18px 14px;
  }

  .list-foto--home,
  .list-foto--page {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
  }

  .list-foto--home .list-foto__item--lead,
  .list-foto--page .list-foto__item--lead {
    grid-column: 1 / -1;
    grid-row: auto;
    aspect-ratio: 16 / 9;
    min-height: 200px;
  }
}

@media (max-width: 640px) {
  .wrap {
    padding-left: 14px;
    padding-right: 14px;
  }

  .main {
    padding-top: 18px;
    padding-bottom: 40px;
  }

  .brand-name {
    font-size: 1.55rem;
  }

  .brand-tag {
    font-size: 0.78rem;
  }

  .nav a {
    font-size: 0.9rem;
  }

  .search button {
    padding: 10px 12px;
    white-space: nowrap;
  }

  .section {
    margin-bottom: 32px;
  }

  .section-head,
  .page-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
  }

  .section-title,
  .page-head .page-title,
  .page-head .section-title {
    font-size: 1.45rem;
  }

  .section-kicker {
    font-size: 0.7rem;
  }

  .news-row {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    padding: 9px 0;
  }

  .news-thumb {
    width: 72px;
    height: 52px;
  }

  .news-title {
    font-size: 0.98rem;
  }

  .news-meta {
    font-size: 0.74rem;
  }

  .list-articles {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .list-article__body h2 {
    font-size: 1.08rem;
    min-height: 0;
    -webkit-line-clamp: 4;
  }

  .list-foto--home,
  .list-foto--page {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .list-foto--home .list-foto__item--lead,
  .list-foto--page .list-foto__item--lead {
    aspect-ratio: 16 / 10;
    min-height: 180px;
  }

  .list-foto__caption {
    font-size: 0.95rem;
  }

  .list-foto__item--lead .list-foto__caption {
    font-size: 1.15rem;
  }

  .detail {
    max-width: none;
  }

  .detail-title {
    font-size: 1.45rem;
    margin-bottom: 12px;
  }

  .preview {
    max-height: 240px;
    margin-bottom: 16px;
    border-radius: 8px;
  }

  .content {
    font-size: 1rem;
  }

  .pager {
    margin-top: 24px;
    padding-top: 14px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .admin-counts {
    gap: 8px;
  }

  .count-pill {
    padding: 12px 14px;
    font-size: 0.84rem;
  }

  .count-pill strong {
    font-size: 1.2rem;
  }

  .login-box {
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fade-up,
  .job-card,
  .admin-toast { animation: none; }
  .admin-live::before,
  .status-pill[data-status="running"] .status-dot,
  .job-card[data-status="running"] .progress-bar::after { animation: none; }
  .job-card { transition: none; }
  .news-thumb img,
  .list-article__media img,
  .list-foto__media img { transition: none; }
}
