/*
 * Aimangul Blog
 * Editorial public pages and the connected administration workspace.
 * This file intentionally contains no behavior; components stay usable when
 * JavaScript is unavailable or has not loaded yet.
 */

:root {
  color-scheme: light;
  --ink: #172033;
  --ink-muted: #667085;
  --ink-subtle: #98a2b3;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #f1f5f9;
  --surface-dark: #111827;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --brand: #2757d7;
  --brand-strong: #1e45af;
  --brand-soft: #eaf0ff;
  --accent: #d85c35;
  --accent-soft: #fff0ea;
  --success: #067647;
  --success-soft: #ecfdf3;
  --warning: #b54708;
  --warning-soft: #fffaeb;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --info: #175cd3;
  --info-soft: #eff8ff;
  --shadow-xs: 0 1px 2px rgb(16 24 40 / 0.05);
  --shadow-sm: 0 1px 3px rgb(16 24 40 / 0.08), 0 1px 2px rgb(16 24 40 / 0.03);
  --shadow-md: 0 10px 20px rgb(16 24 40 / 0.08), 0 2px 5px rgb(16 24 40 / 0.04);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --content-width: 1180px;
  --reading-width: 760px;
  --font-sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: Iowan Old Style, Baskerville, "Times New Roman", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--surface-soft);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

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

button,
[type="button"],
[type="submit"],
[type="reset"] {
  cursor: pointer;
}

button:disabled,
[type="button"]:disabled,
[type="submit"]:disabled,
[type="reset"]:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: var(--brand);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.14em;
}

a:hover {
  color: var(--brand-strong);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgb(39 87 215 / 0.32);
  outline-offset: 2px;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

ul,
ol {
  margin: 0;
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
}

::selection {
  color: #10204e;
  background: #cbd8ff;
}

.container {
  width: min(calc(100% - 40px), var(--content-width));
  margin-inline: auto;
}

.reading-container {
  width: min(calc(100% - 40px), var(--reading-width));
  margin-inline: auto;
}

.visually-hidden,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  color: #fff;
  background: var(--surface-dark);
  border-radius: var(--radius-sm);
  transform: translateY(-160%);
  transition: transform 150ms ease;
}

.skip-link:focus {
  color: #fff;
  transform: translateY(0);
}

/* Shared controls -------------------------------------------------------- */

.button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.925rem;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover,
.btn:hover {
  text-decoration: none;
}

.button:active,
.btn:active {
  transform: translateY(1px);
}

.button--primary,
.btn-primary,
.btn--primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 1px 2px rgb(39 87 215 / 0.22);
}

.button--primary:hover,
.btn-primary:hover,
.btn--primary:hover {
  color: #fff;
  background: var(--brand-strong);
}

.button--secondary,
.btn-secondary,
.btn--secondary {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-xs);
}

.button--secondary:hover,
.btn-secondary:hover,
.btn--secondary:hover {
  color: var(--ink);
  background: var(--surface-muted);
  border-color: #b9c0cc;
}

.button--soft,
.btn-soft,
.btn--soft {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: transparent;
}

.button--soft:hover,
.btn-soft:hover,
.btn--soft:hover {
  color: var(--brand-strong);
  background: #dbe6ff;
}

.button--danger,
.btn-danger,
.btn--danger {
  color: #fff;
  background: var(--danger);
}

.button--danger:hover,
.btn-danger:hover,
.btn--danger:hover {
  color: #fff;
  background: #912018;
}

.button--ghost,
.btn-ghost,
.btn--ghost {
  color: var(--ink-muted);
  background: transparent;
}

.button--ghost:hover,
.btn-ghost:hover,
.btn--ghost:hover {
  color: var(--ink);
  background: var(--surface-muted);
}

.button--sm,
.btn-sm,
.btn--sm {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  font-size: 0.8125rem;
}

.button--lg,
.btn-lg,
.btn--lg {
  min-height: 50px;
  padding: 13px 19px;
  font-size: 1rem;
}

.button--icon,
.btn-icon {
  width: 40px;
  padding: 0;
}

.icon,
.button svg,
.btn svg {
  width: 1.05em;
  height: 1.05em;
  flex: 0 0 auto;
}

.pill,
.tag,
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 8px;
  color: #344054;
  background: var(--surface-muted);
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.tag {
  color: var(--brand-strong);
  background: var(--brand-soft);
  border-color: #dbe6ff;
  text-decoration: none;
}

.tag:hover {
  color: var(--brand-strong);
  background: #dbe6ff;
}

.badge--success,
.status--published,
.status--approved,
.status--complete {
  color: var(--success);
  background: var(--success-soft);
  border-color: #abefc6;
}

.badge--warning,
.status--draft,
.status--pending,
.status--review {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: #fedf89;
}

.badge--danger,
.status--failed,
.status--rejected,
.status--archived {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: #fecdca;
}

.badge--info,
.status--processing,
.status--scheduled,
.status--new {
  color: var(--info);
  background: var(--info-soft);
  border-color: #b2ddff;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

/* Public shell ----------------------------------------------------------- */

.site-shell,
.public-page {
  min-height: 100vh;
  background: var(--surface);
}

.site-header {
  position: relative;
  z-index: 20;
  background: rgb(255 255 255 / 0.95);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(13px);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.brand:hover {
  color: var(--ink);
}

.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #376cf2, #2748ae);
  border-radius: 11px;
  box-shadow: 0 5px 12px rgb(39 87 215 / 0.25);
}

.brand__name {
  overflow: hidden;
  font-size: 1.125rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 10px;
  color: #475467;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 650;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav a:hover,
.site-nav a[aria-current="page"],
.site-nav .is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.topic-bar {
  overflow-x: auto;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.topic-bar__inner {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 52px;
  white-space: nowrap;
}

.topic-bar a {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 5px 11px;
  color: var(--ink-muted);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}

.topic-bar a:hover,
.topic-bar a[aria-current="page"],
.topic-bar .is-active {
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.site-main {
  padding-block: 40px 72px;
}

.site-footer {
  color: #cbd5e1;
  background: #111827;
}

.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(3, minmax(0, 0.7fr));
  gap: 48px;
  padding-block: 54px 30px;
}

.site-footer a {
  color: #e2e8f0;
  text-decoration: none;
}

.site-footer a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer h2,
.site-footer h3 {
  margin-bottom: 13px;
  color: #fff;
  font-size: 0.875rem;
}

.footer-links {
  display: grid;
  gap: 8px;
  list-style: none;
  font-size: 0.875rem;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 20px;
  border-top: 1px solid rgb(255 255 255 / 0.13);
  color: #94a3b8;
  font-size: 0.8125rem;
}

/* Editorial home and listings ------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  background: #152b60;
}

.hero::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 18% 16%, rgb(95 139 255 / 0.6), transparent 34%),
    radial-gradient(circle at 85% 95%, rgb(225 94 54 / 0.42), transparent 36%),
    linear-gradient(116deg, #101f4b 0%, #254bb2 52%, #17306c 100%);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(280px, 0.97fr);
  align-items: center;
  gap: clamp(34px, 7vw, 94px);
  min-height: 460px;
  padding-block: 64px;
}

.eyebrow,
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #b7cbff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  line-height: 1.2;
  text-transform: uppercase;
}

.eyebrow::before,
.hero__eyebrow::before {
  width: 18px;
  height: 2px;
  content: "";
  background: currentColor;
}

.hero h1 {
  max-width: 720px;
  color: #fff;
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 5vw, 4.75rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero__lede {
  max-width: 600px;
  margin-top: 20px;
  color: #d5e0ff;
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero .button--primary,
.hero .btn-primary {
  color: #152b60;
  background: #fff;
  box-shadow: 0 5px 17px rgb(0 0 0 / 0.17);
}

.hero .button--primary:hover,
.hero .btn-primary:hover {
  color: #152b60;
  background: #eaf0ff;
}

.hero .button--secondary,
.hero .btn-secondary {
  color: #fff;
  background: rgb(255 255 255 / 0.1);
  border-color: rgb(255 255 255 / 0.28);
  box-shadow: none;
}

.hero .button--secondary:hover,
.hero .btn-secondary:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.18);
}

.hero__feature {
  position: relative;
  overflow: hidden;
  min-height: 315px;
  border: 1px solid rgb(255 255 255 / 0.21);
  border-radius: var(--radius-xl);
  background: rgb(255 255 255 / 0.13);
  box-shadow: 0 22px 48px rgb(4 18 57 / 0.3);
}

.hero__feature img {
  width: 100%;
  height: 100%;
  min-height: 315px;
  object-fit: cover;
}

.hero__feature::after {
  position: absolute;
  inset: auto 0 0;
  height: 45%;
  content: "";
  background: linear-gradient(transparent, rgb(8 20 53 / 0.76));
}

.hero__feature-copy {
  position: absolute;
  z-index: 1;
  right: 24px;
  bottom: 22px;
  left: 24px;
}

.hero__feature-copy .post-meta {
  color: #d8e4ff;
}

.hero__feature-copy h2 {
  margin-top: 7px;
  color: #fff;
  font-family: var(--font-serif);
  font-size: 1.55rem;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.section {
  padding-block: clamp(42px, 6vw, 76px);
}

.section--muted {
  background: var(--surface-soft);
}

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

.section-header__copy {
  max-width: 690px;
}

.section-header__eyebrow {
  display: block;
  margin-bottom: 7px;
  color: var(--brand);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section-header h2 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(1.85rem, 3vw, 2.65rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.05;
}

.section-header p {
  margin-top: 10px;
  color: var(--ink-muted);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  font-size: 0.875rem;
  font-weight: 750;
  text-decoration: none;
}

.link-arrow::after {
  content: "→";
  transition: transform 150ms ease;
}

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

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

.post-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.post-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.post-card:hover {
  border-color: #c8d5f6;
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.post-card__image {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: #d8e1f6;
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms ease;
}

.post-card:hover .post-card__image img {
  transform: scale(1.04);
}

.post-card__body {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 21px;
}

.post-card__category {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  text-decoration: none;
}

.post-card h2,
.post-card h3 {
  margin-top: 8px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

.post-card h2 a,
.post-card h3 a {
  color: inherit;
  text-decoration: none;
}

.post-card h2 a:hover,
.post-card h3 a:hover {
  color: var(--brand-strong);
}

.post-card__excerpt {
  display: -webkit-box;
  margin-top: 10px;
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 0.925rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.post-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 20px;
}

.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  color: var(--ink-subtle);
  font-size: 0.77rem;
  font-weight: 600;
}

.post-meta > span + span::before {
  display: inline-block;
  width: 3px;
  height: 3px;
  margin-right: 10px;
  content: "";
  vertical-align: middle;
  background: #b0b7c3;
  border-radius: 50%;
}

.post-card--horizontal {
  display: grid;
  grid-template-columns: minmax(180px, 0.73fr) minmax(0, 1fr);
}

.post-card--horizontal .post-card__image {
  height: 100%;
  min-height: 216px;
}

.post-card--featured {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.post-card--featured .post-card__image {
  min-height: 360px;
  aspect-ratio: auto;
}

.post-card--featured .post-card__body {
  padding: clamp(25px, 4vw, 42px);
}

.post-card--featured h2,
.post-card--featured h3 {
  font-size: clamp(1.85rem, 3vw, 2.7rem);
  line-height: 1.03;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.category-card {
  position: relative;
  display: flex;
  min-height: 138px;
  align-items: flex-end;
  overflow: hidden;
  padding: 17px;
  color: #fff;
  background: #1e3f97;
  border-radius: var(--radius-md);
  isolation: isolate;
  text-decoration: none;
}

.category-card::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  content: "";
  background: linear-gradient(145deg, rgb(255 255 255 / 0.16), rgb(0 0 0 / 0.27));
  transition: opacity 180ms ease;
}

.category-card:hover {
  color: #fff;
}

.category-card:hover::before {
  opacity: 0.67;
}

.category-card__count {
  display: block;
  margin-bottom: 4px;
  color: rgb(255 255 255 / 0.72);
  font-size: 0.72rem;
  font-weight: 700;
}

.category-card__name {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1;
}

.newsletter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  align-items: center;
  gap: 32px;
  padding: clamp(28px, 5vw, 56px);
  color: #fff;
  background: linear-gradient(120deg, #11275d, #2955cb);
  border-radius: var(--radius-xl);
  box-shadow: 0 14px 30px rgb(36 69 159 / 0.2);
}

.newsletter h2 {
  color: #fff;
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 1.06;
}

.newsletter p {
  max-width: 600px;
  margin-top: 11px;
  color: #d8e4ff;
}

.newsletter__form {
  display: flex;
  gap: 9px;
}

.newsletter__form input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 10px 13px;
  color: var(--ink);
  background: #fff;
  border: 1px solid transparent;
  border-radius: 10px;
  outline: none;
}

.newsletter__form input::placeholder {
  color: #98a2b3;
}

.newsletter__form button {
  flex: 0 0 auto;
  color: #152b60;
  background: #fff;
}

.newsletter__form button:hover {
  color: #152b60;
  background: #eaf0ff;
}

/* Search, article and comments ------------------------------------------ */

.page-heading {
  max-width: 760px;
  margin-bottom: 34px;
}

.page-heading__eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-heading h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.35rem, 5vw, 4rem);
  font-weight: 600;
  letter-spacing: -0.055em;
  line-height: 1;
}

.page-heading p {
  margin-top: 15px;
  color: var(--ink-muted);
  font-size: 1.06rem;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
}

.search-field {
  position: relative;
  flex: 1 1 280px;
}

.search-field input {
  width: 100%;
  min-height: 44px;
  padding: 10px 13px 10px 40px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  box-shadow: var(--shadow-xs);
}

.search-field svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--ink-subtle);
  pointer-events: none;
  transform: translateY(-50%);
}

.article-header {
  padding-top: clamp(24px, 4vw, 56px);
  padding-bottom: 30px;
}

.article-header__category {
  display: inline-block;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.085em;
  text-transform: uppercase;
  text-decoration: none;
}

.article-header h1 {
  margin-top: 13px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(2.45rem, 5.4vw, 5rem);
  font-weight: 600;
  letter-spacing: -0.06em;
  line-height: 0.99;
}

.article-header__dek {
  margin-top: 20px;
  color: #475467;
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.45;
}

.article-byline {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 26px;
}

.avatar {
  display: inline-grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  overflow: hidden;
  place-items: center;
  color: #fff;
  background: #536991;
  border-radius: 50%;
  font-size: 0.79rem;
  font-weight: 800;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.article-byline__name {
  display: block;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 750;
}

.article-byline__meta {
  display: block;
  margin-top: 1px;
  color: var(--ink-subtle);
  font-size: 0.78rem;
}

.article-cover {
  overflow: hidden;
  margin-bottom: clamp(30px, 5vw, 54px);
  border-radius: var(--radius-lg);
  background: #e5e7eb;
}

.article-cover img {
  width: 100%;
  max-height: 690px;
  object-fit: cover;
}

.article-cover figcaption,
.article-figure figcaption {
  padding: 10px 2px 0;
  color: var(--ink-subtle);
  font-size: 0.76rem;
  line-height: 1.45;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, var(--reading-width)) minmax(170px, 220px);
  align-items: start;
  justify-content: center;
  gap: clamp(32px, 7vw, 96px);
}

.article-share {
  position: sticky;
  top: 24px;
  display: grid;
  gap: 10px;
  padding-top: 8px;
}

.article-share__label {
  color: var(--ink-subtle);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.article-share__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.article-share__actions a,
.article-share__actions button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-xs);
}

.article-share__actions a:hover,
.article-share__actions button:hover {
  color: var(--brand);
  border-color: #bed0ff;
  background: var(--brand-soft);
}

.article-content,
.post-content,
.prose {
  color: #344054;
  font-family: var(--font-serif);
  font-size: clamp(1.1rem, 1.35vw, 1.24rem);
  line-height: 1.76;
}

.article-content > * + *,
.post-content > * + *,
.prose > * + * {
  margin-top: 1.45em;
}

.article-content h2,
.article-content h3,
.article-content h4,
.post-content h2,
.post-content h3,
.post-content h4,
.prose h2,
.prose h3,
.prose h4 {
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: -0.036em;
  line-height: 1.12;
}

.article-content h2,
.post-content h2,
.prose h2 {
  margin-top: 2.2em;
  font-size: 1.78em;
}

.article-content h3,
.post-content h3,
.prose h3 {
  margin-top: 1.85em;
  font-size: 1.37em;
}

.article-content h4,
.post-content h4,
.prose h4 {
  font-size: 1.13em;
}

.article-content a,
.post-content a,
.prose a {
  color: var(--brand-strong);
}

.article-content ul,
.article-content ol,
.post-content ul,
.post-content ol,
.prose ul,
.prose ol {
  padding-left: 1.32em;
}

.article-content li + li,
.post-content li + li,
.prose li + li {
  margin-top: 0.48em;
}

.article-content blockquote,
.post-content blockquote,
.prose blockquote {
  padding: 0.5em 0 0.5em 1.1em;
  color: #293b68;
  border-left: 3px solid var(--brand);
  font-size: 1.22em;
  font-style: italic;
  line-height: 1.5;
}

.article-content pre,
.post-content pre,
.prose pre {
  overflow: auto;
  padding: 18px;
  color: #dbeafe;
  background: #15203a;
  border-radius: var(--radius-md);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78em;
  line-height: 1.62;
}

.article-content code:not(pre code),
.post-content code:not(pre code),
.prose code:not(pre code) {
  padding: 0.12em 0.34em;
  color: #2e4784;
  background: #edf2ff;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8em;
}

.article-content img,
.post-content img,
.prose img {
  border-radius: var(--radius-md);
}

.article-figure {
  margin-inline: 0;
}

.article-callout,
.callout {
  padding: 18px 19px;
  color: #27436f;
  background: #f4f7ff;
  border: 1px solid #d8e3ff;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.87rem;
  line-height: 1.6;
}

.article-callout strong,
.callout strong {
  color: #1d3473;
}

.article-footer {
  margin-top: 42px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.comments {
  margin-top: clamp(50px, 8vw, 88px);
  padding-top: 38px;
  border-top: 1px solid var(--line);
}

/* Store offers are explicitly labelled editorial commerce blocks. Their
   price, availability and destination remain shop-owned rather than being
   copied into an article by hand. */
.article-product-offers {
  margin-top: clamp(46px, 7vw, 76px);
  padding: clamp(20px, 4vw, 30px);
  color: #13203a;
  background: linear-gradient(135deg, #fffaf1, #f6ecdd);
  border: 1px solid #e4d0b5;
  border-radius: var(--radius-lg);
  font-family: var(--font-sans);
}

.article-product-offers__label {
  margin: 0 0 7px;
  color: #8b5e34;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.article-product-offers > h2 {
  margin: 0 0 18px;
  color: #13203a;
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3vw, 2rem);
  letter-spacing: -0.04em;
}

.article-product-offers__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
}

.article-product-offer {
  display: grid;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eadcc9;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 24px rgb(50 35 20 / 0.07);
}

.article-product-offer__image {
  display: block;
  min-height: 180px;
  background: #e9dfd0;
}

.article-product-offer__image img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 270px;
  object-fit: cover;
}

.article-product-offer__body {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.article-product-offer__body > span {
  color: #8b5e34;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.article-product-offer h3 {
  margin: 0;
  color: #13203a;
  font-family: var(--font-serif);
  font-size: 1.27rem;
  letter-spacing: -0.025em;
}

.article-product-offer h3 a,
.article-product-offer footer a {
  color: inherit;
  text-decoration: none;
}

.article-product-offer h3 a:hover,
.article-product-offer footer a:hover {
  color: #8b5e34;
}

.article-product-offer p {
  margin: 0;
  color: #58657a;
  font-size: 0.88rem;
  line-height: 1.58;
}

.article-product-offer footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 5px;
  padding-top: 13px;
  color: #13203a;
  border-top: 1px solid #eee3d5;
  font-size: 0.82rem;
}

.article-product-offer footer a {
  color: #6f4626;
  font-weight: 800;
}

.comments__title {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  letter-spacing: -0.04em;
}

.comment-form {
  margin-top: 22px;
}

.comment-list {
  display: grid;
  gap: 23px;
  margin-top: 30px;
  list-style: none;
}

.comment {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 12px;
}

.comment__head {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 9px;
}

.comment__author {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 800;
}

.comment__time {
  color: var(--ink-subtle);
  font-size: 0.76rem;
}

.comment__body {
  margin-top: 5px;
  color: #475467;
  font-size: 0.925rem;
  line-height: 1.6;
}

.comment__actions {
  display: flex;
  gap: 13px;
  margin-top: 8px;
}

.comment__actions button,
.comment__actions a {
  padding: 0;
  color: var(--ink-muted);
  background: none;
  border: 0;
  font-size: 0.77rem;
  font-weight: 750;
}

.comment__actions button:hover,
.comment__actions a:hover {
  color: var(--brand);
}

/* Forms, alerts and status ------------------------------------------------ */

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

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

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.form-field--full {
  grid-column: 1 / -1;
}

.form-label,
.form-field label {
  color: #344054;
  font-size: 0.83rem;
  font-weight: 750;
}

.form-label__optional {
  margin-left: 4px;
  color: var(--ink-subtle);
  font-weight: 500;
}

.form-help {
  color: var(--ink-subtle);
  font-size: 0.75rem;
  line-height: 1.45;
}

.form-error {
  color: var(--danger);
  font-size: 0.76rem;
  font-weight: 600;
}

.form-control,
.form-field input:not([type="checkbox"]):not([type="radio"]),
.form-field select,
.form-field textarea,
.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: var(--shadow-xs);
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-field textarea,
.textarea {
  min-height: 118px;
  resize: vertical;
}

.form-control::placeholder,
.form-field input::placeholder,
.form-field textarea::placeholder,
.input::placeholder,
.textarea::placeholder {
  color: #98a2b3;
}

.form-control:focus,
.form-field input:not([type="checkbox"]):not([type="radio"]):focus,
.form-field select:focus,
.form-field textarea:focus,
.input:focus,
.select:focus,
.textarea:focus {
  border-color: #79a0f7;
  box-shadow: 0 0 0 4px rgb(39 87 215 / 0.12);
}

.form-field.is-invalid .form-control,
.form-field.is-invalid input,
.form-field.is-invalid select,
.form-field.is-invalid textarea,
.form-control[aria-invalid="true"] {
  border-color: #fda29b;
}

.form-field.is-invalid .form-control:focus,
.form-field.is-invalid input:focus,
.form-field.is-invalid select:focus,
.form-field.is-invalid textarea:focus,
.form-control[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgb(244 63 94 / 0.1);
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.choice-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.choice-row input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  margin: 2px 0 0;
  accent-color: var(--brand);
}

.choice-row label {
  color: #475467;
  font-size: 0.87rem;
  line-height: 1.45;
}

.switch-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.switch-row:first-child {
  padding-top: 0;
}

.switch-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.switch-row__copy strong {
  display: block;
  color: #344054;
  font-size: 0.88rem;
}

.switch-row__copy span {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.switch {
  position: relative;
  width: 40px;
  height: 23px;
  flex: 0 0 auto;
}

.switch input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  display: block;
  background: #cbd5e1;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 17px;
  height: 17px;
  content: "";
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 2px rgb(16 24 40 / 0.18);
  transition: transform 160ms ease;
}

.switch input:checked + span {
  background: var(--brand);
}

.switch input:checked + span::after {
  transform: translateX(17px);
}

.switch input:focus-visible + span {
  outline: 3px solid rgb(39 87 215 / 0.28);
  outline-offset: 2px;
}

.alert,
.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 14px;
  color: #344054;
  background: var(--surface-muted);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.48;
}

.alert svg,
.notice svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.alert strong,
.notice strong {
  color: inherit;
}

.alert--success,
.notice--success {
  color: #05603a;
  background: var(--success-soft);
  border-color: #abefc6;
}

.alert--warning,
.notice--warning {
  color: #93370d;
  background: var(--warning-soft);
  border-color: #fedf89;
}

.alert--danger,
.notice--danger {
  color: #912018;
  background: var(--danger-soft);
  border-color: #fecdca;
}

.alert--info,
.notice--info {
  color: #175cd3;
  background: var(--info-soft);
  border-color: #b2ddff;
}

.empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 32px;
  color: var(--ink-muted);
  text-align: center;
  background: var(--surface);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius-md);
}

.empty-state__inner {
  max-width: 390px;
}

.empty-state__icon {
  display: grid;
  width: 45px;
  height: 45px;
  margin: 0 auto 13px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
}

.empty-state h2,
.empty-state h3 {
  color: var(--ink);
  font-size: 1rem;
}

.empty-state p {
  margin-top: 5px;
  font-size: 0.84rem;
}

.empty-state .button,
.empty-state .btn {
  margin-top: 16px;
}

/* Admin workspace -------------------------------------------------------- */

.admin-body {
  background: #f5f7fb;
}

.admin-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 256px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  min-height: 100vh;
  flex-direction: column;
  color: #cbd5e1;
  background: #111827;
}

.admin-sidebar__brand {
  display: flex;
  min-height: 72px;
  align-items: center;
  gap: 10px;
  padding: 17px 19px;
  color: #fff;
  border-bottom: 1px solid rgb(255 255 255 / 0.09);
  font-weight: 800;
  letter-spacing: -0.025em;
  text-decoration: none;
}

.admin-sidebar__brand:hover {
  color: #fff;
}

.admin-sidebar__brand .brand__mark {
  width: 31px;
  height: 31px;
  border-radius: 9px;
}

.admin-sidebar__nav {
  display: grid;
  gap: 4px;
  padding: 19px 12px;
  overflow-y: auto;
}

.admin-nav__label {
  padding: 10px 9px 5px;
  color: #8390a8;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.admin-nav__link {
  display: flex;
  min-height: 39px;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  color: #cbd5e1;
  border-radius: 8px;
  font-size: 0.855rem;
  font-weight: 650;
  text-decoration: none;
}

.admin-nav__link svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: #9aa9c2;
}

.admin-nav__link:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

.admin-nav__link:hover svg {
  color: #dbe6ff;
}

.admin-nav__link[aria-current="page"],
.admin-nav__link.is-active {
  color: #fff;
  background: #244aa6;
  box-shadow: inset 0 0 0 1px rgb(155 183 255 / 0.15);
}

.admin-nav__link[aria-current="page"] svg,
.admin-nav__link.is-active svg {
  color: #fff;
}

.admin-nav__count {
  min-width: 19px;
  min-height: 19px;
  margin-left: auto;
  padding: 3px 5px;
  color: #d6e1ff;
  background: rgb(144 176 255 / 0.16);
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.admin-sidebar__footer {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid rgb(255 255 255 / 0.09);
}

.admin-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  color: #e5e7eb;
  border-radius: 8px;
  text-decoration: none;
}

.admin-user:hover {
  color: #fff;
  background: rgb(255 255 255 / 0.08);
}

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

.admin-user__name,
.admin-user__email {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-user__name {
  font-size: 0.78rem;
  font-weight: 750;
}

.admin-user__email {
  margin-top: 2px;
  color: #97a3b9;
  font-size: 0.67rem;
}

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

.admin-topbar {
  position: sticky;
  z-index: 10;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px clamp(20px, 4vw, 42px);
  background: rgb(255 255 255 / 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

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

.admin-topbar__crumb {
  display: block;
  overflow: hidden;
  color: var(--ink-subtle);
  font-size: 0.7rem;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar h1 {
  overflow: hidden;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-topbar__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.admin-menu-toggle {
  display: none;
}

.admin-content {
  width: min(100%, 1480px);
  margin: 0 auto;
  padding: clamp(22px, 4vw, 42px);
}

.admin-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.admin-page-header__copy {
  min-width: 0;
}

.admin-page-header h2 {
  color: var(--ink);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  font-weight: 780;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.admin-page-header p {
  max-width: 790px;
  margin-top: 7px;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.admin-page-header__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.admin-card,
.panel {
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.admin-card__head,
.panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.admin-card__head h2,
.admin-card__head h3,
.panel__head h2,
.panel__head h3 {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 780;
  letter-spacing: -0.015em;
}

.admin-card__head p,
.panel__head p {
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 0.77rem;
}

.admin-card__body,
.panel__body {
  padding: 20px;
}

.admin-card__foot,
.panel__foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px;
  background: #fcfcfd;
  border-top: 1px solid var(--line);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

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

.admin-grid > .span-3,
.admin-grid > .col-3 {
  grid-column: span 3;
}

.admin-grid > .span-4,
.admin-grid > .col-4 {
  grid-column: span 4;
}

.admin-grid > .span-5,
.admin-grid > .col-5 {
  grid-column: span 5;
}

.admin-grid > .span-6,
.admin-grid > .col-6 {
  grid-column: span 6;
}

.admin-grid > .span-7,
.admin-grid > .col-7 {
  grid-column: span 7;
}

.admin-grid > .span-8,
.admin-grid > .col-8 {
  grid-column: span 8;
}

.admin-grid > .span-9,
.admin-grid > .col-9 {
  grid-column: span 9;
}

.admin-grid > .span-12,
.admin-grid > .col-12 {
  grid-column: 1 / -1;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.stat-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stat-card__label {
  overflow: hidden;
  color: var(--ink-muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-card__icon {
  display: grid;
  width: 33px;
  height: 33px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 9px;
}

.stat-card__icon svg {
  width: 17px;
  height: 17px;
}

.stat-card__value {
  display: block;
  margin-top: 14px;
  color: var(--ink);
  font-size: 1.72rem;
  font-weight: 780;
  letter-spacing: -0.055em;
  line-height: 1;
}

.stat-card__change {
  display: block;
  margin-top: 9px;
  color: var(--ink-subtle);
  font-size: 0.73rem;
}

.stat-card__change strong {
  color: var(--success);
}

.stat-card__change.is-negative strong {
  color: var(--danger);
}

.admin-split {
  display: grid;
  grid-template-columns: minmax(0, 1.58fr) minmax(280px, 0.72fr);
  gap: 20px;
}

.admin-stack {
  display: grid;
  align-content: start;
  gap: 20px;
}

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  margin-bottom: 20px;
  padding-bottom: 1px;
  border-bottom: 1px solid var(--line);
  scrollbar-width: thin;
}

.tab {
  position: relative;
  flex: 0 0 auto;
  padding: 10px 11px;
  color: var(--ink-muted);
  background: none;
  border: 0;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.tab::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 2px;
  content: "";
  background: transparent;
  border-radius: 999px 999px 0 0;
}

.tab:hover {
  color: var(--ink);
}

.tab[aria-selected="true"],
.tab[aria-current="page"],
.tab.is-active {
  color: var(--brand);
}

.tab[aria-selected="true"]::after,
.tab[aria-current="page"]::after,
.tab.is-active::after {
  background: var(--brand);
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.toolbar__grow {
  min-width: min(100%, 230px);
  flex: 1 1 230px;
}

.toolbar select {
  min-height: 40px;
  padding: 8px 32px 8px 10px;
  color: #475467;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  appearance: none;
}

.data-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.data-table {
  min-width: 650px;
  color: #344054;
  font-size: 0.82rem;
}

.data-table th {
  padding: 11px 16px;
  color: #475467;
  background: #f9fafb;
  border-bottom: 1px solid var(--line);
  font-size: 0.71rem;
  font-weight: 780;
  letter-spacing: 0.035em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table tbody tr:hover {
  background: #f9fbff;
}

.table-title {
  display: block;
  max-width: 360px;
  overflow: hidden;
  color: var(--ink);
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-subtitle {
  display: block;
  max-width: 340px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--ink-subtle);
  font-size: 0.74rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 5px;
}

.table-actions .button,
.table-actions .btn {
  min-height: 30px;
  padding: 5px 7px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 15px;
  color: var(--ink-muted);
  font-size: 0.78rem;
}

.pagination__actions {
  display: flex;
  gap: 6px;
}

/* Admin blog import, approvals and media -------------------------------- */

.upload-zone,
.dropzone {
  display: grid;
  min-height: 208px;
  place-items: center;
  padding: 27px;
  color: var(--ink-muted);
  text-align: center;
  background: #fbfcff;
  border: 1.5px dashed #b8c9ef;
  border-radius: var(--radius-md);
}

.upload-zone:hover,
.upload-zone.is-dragging,
.dropzone:hover,
.dropzone.is-dragging {
  color: var(--brand-strong);
  background: #f5f8ff;
  border-color: #6087e8;
}

.upload-zone__icon {
  display: grid;
  width: 45px;
  height: 45px;
  margin: 0 auto 12px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 50%;
}

.upload-zone h3,
.dropzone h3 {
  color: var(--ink);
  font-size: 0.94rem;
}

.upload-zone p,
.dropzone p {
  max-width: 440px;
  margin-top: 5px;
  font-size: 0.79rem;
}

.upload-zone .button,
.dropzone .button,
.upload-zone .btn,
.dropzone .btn {
  margin-top: 15px;
}

.upload-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  list-style: none;
}

.upload-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fcfcfd;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-item__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border-radius: 7px;
}

.upload-item__name {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 0.81rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-item__meta {
  display: block;
  margin-top: 2px;
  color: var(--ink-subtle);
  font-size: 0.7rem;
}

.progress {
  width: 100%;
  height: 6px;
  overflow: hidden;
  margin-top: 7px;
  background: #e4e7ec;
  border-radius: 999px;
}

.progress > span {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  background: var(--brand);
  border-radius: inherit;
}

.approval-list,
.activity-list {
  display: grid;
  gap: 0;
  list-style: none;
}

.approval-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.approval-card:first-child {
  padding-top: 0;
}

.approval-card:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.approval-card__icon {
  display: grid;
  width: 33px;
  height: 33px;
  place-items: center;
  color: var(--warning);
  background: var(--warning-soft);
  border-radius: 50%;
}

.approval-card__title {
  color: #344054;
  font-size: 0.83rem;
  font-weight: 760;
  line-height: 1.35;
}

.approval-card__summary {
  display: block;
  margin-top: 3px;
  color: var(--ink-muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.approval-card__time {
  color: var(--ink-subtle);
  font-size: 0.69rem;
  white-space: nowrap;
}

.approval-card__actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.activity-item {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 18px;
}

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

.activity-item:not(:last-child)::before {
  position: absolute;
  top: 25px;
  bottom: 0;
  left: 12px;
  width: 1px;
  content: "";
  background: #dce3ef;
}

.activity-item__dot {
  position: relative;
  z-index: 1;
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid #d9e4ff;
  border-radius: 50%;
}

.activity-item__text {
  color: #475467;
  font-size: 0.79rem;
  line-height: 1.45;
}

.activity-item__text strong {
  color: #344054;
}

.activity-item__time {
  display: block;
  margin-top: 3px;
  color: var(--ink-subtle);
  font-size: 0.7rem;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.media-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.media-card__preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 0.72;
  background: #e4e7ec;
}

.media-card__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-card__body {
  padding: 11px;
}

.media-card__name {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 0.77rem;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-card__meta {
  display: block;
  margin-top: 3px;
  color: var(--ink-subtle);
  font-size: 0.68rem;
}

.media-card__check {
  position: absolute;
  z-index: 2;
  top: 9px;
  left: 9px;
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--brand);
}

/* Messaging -------------------------------------------------------------- */

.inbox-layout {
  display: grid;
  min-height: min(72vh, 760px);
  grid-template-columns: minmax(240px, 0.62fr) minmax(0, 1.38fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
}

.inbox-list {
  overflow-y: auto;
  border-right: 1px solid var(--line);
}

.inbox-list__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 64px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.inbox-list__head h2 {
  font-size: 0.94rem;
  font-weight: 780;
}

.inbox-filter {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.inbox-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 9px;
  padding: 13px;
  color: inherit;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}

.inbox-item:hover {
  color: inherit;
  background: #f9fbff;
}

.inbox-item[aria-current="page"],
.inbox-item.is-selected {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.inbox-item__title {
  display: block;
  overflow: hidden;
  color: #344054;
  font-size: 0.81rem;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item__preview {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--ink-muted);
  font-size: 0.73rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inbox-item__time {
  color: var(--ink-subtle);
  font-size: 0.67rem;
  white-space: nowrap;
}

.inbox-item--unread .inbox-item__title,
.inbox-item--unread .inbox-item__preview {
  color: var(--ink);
}

.message-thread {
  display: grid;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
}

.message-thread__head {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.message-thread__head h2 {
  color: #344054;
  font-size: 0.94rem;
  font-weight: 780;
}

.message-thread__meta {
  display: block;
  margin-top: 2px;
  color: var(--ink-subtle);
  font-size: 0.7rem;
}

.message-thread__messages {
  display: grid;
  align-content: start;
  gap: 18px;
  padding: 21px clamp(16px, 3vw, 28px);
  overflow-y: auto;
  background: #fcfdff;
}

.message {
  display: grid;
  grid-template-columns: 33px minmax(0, 1fr);
  gap: 9px;
  max-width: min(100%, 660px);
}

.message--mine {
  grid-template-columns: minmax(0, 1fr) 33px;
  margin-left: auto;
}

.message--mine .message__avatar {
  grid-column: 2;
}

.message--mine .message__content {
  grid-column: 1;
  grid-row: 1;
}

.message__head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-bottom: 4px;
}

.message--mine .message__head {
  justify-content: flex-end;
}

.message__name {
  color: #475467;
  font-size: 0.72rem;
  font-weight: 750;
}

.message__time {
  color: var(--ink-subtle);
  font-size: 0.67rem;
}

.message__bubble {
  padding: 10px 12px;
  color: #344054;
  background: #f1f5f9;
  border: 1px solid #e4e7ec;
  border-radius: 3px 12px 12px;
  font-size: 0.84rem;
  line-height: 1.52;
}

.message--mine .message__bubble {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand);
  border-radius: 12px 3px 12px 12px;
}

.message--system {
  display: block;
  max-width: none;
  padding: 10px 13px;
  color: #694b13;
  background: var(--warning-soft);
  border: 1px solid #fedf89;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.77rem;
  text-align: center;
}

.message-thread__composer {
  padding: 14px 18px;
  background: #fff;
  border-top: 1px solid var(--line);
}

.message-composer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.message-composer textarea {
  min-height: 42px;
  max-height: 160px;
  padding: 10px 11px;
  resize: vertical;
}

/* Account/auth ----------------------------------------------------------- */

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 10% 5%, rgb(87 125 238 / 0.2), transparent 33%),
    linear-gradient(135deg, #f8fbff, #f4f6fb 54%, #edf2ff);
}

.auth-card {
  width: min(100%, 440px);
  padding: clamp(25px, 6vw, 42px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 44px rgb(18 36 78 / 0.12);
}

.auth-card__brand {
  justify-content: center;
}

.auth-card h1 {
  margin-top: 29px;
  color: var(--ink);
  font-size: 1.65rem;
  font-weight: 780;
  letter-spacing: -0.045em;
  text-align: center;
}

.auth-card__lede {
  margin-top: 8px;
  color: var(--ink-muted);
  font-size: 0.89rem;
  text-align: center;
}

.google-button {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin-top: 25px;
  color: #344054;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  box-shadow: var(--shadow-xs);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
}

.google-button:hover {
  color: #344054;
  background: #f9fafb;
  border-color: #b9c0cc;
}

.google-button svg,
.google-button img {
  width: 19px;
  height: 19px;
  object-fit: contain;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 23px 0;
  color: var(--ink-subtle);
  font-size: 0.72rem;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  content: "";
  background: var(--line);
}

.auth-card__fineprint {
  margin-top: 21px;
  color: var(--ink-subtle);
  font-size: 0.72rem;
  line-height: 1.5;
  text-align: center;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1120px) {
  .site-footer__inner {
    grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 0.7fr));
  }

  .site-footer__inner > :first-child {
    grid-column: 1 / -1;
  }

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

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

  .post-card--featured {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 920px) {
  .site-header__inner {
    min-height: 65px;
    gap: 12px;
  }

  .site-nav {
    display: none;
  }

  .hero__inner,
  .newsletter {
    grid-template-columns: 1fr;
  }

  .hero__inner {
    min-height: 0;
    padding-block: 58px;
  }

  .hero__feature {
    max-width: 670px;
  }

  .article-layout {
    display: block;
  }

  .article-share {
    position: static;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0;
  }

  .article-share__actions {
    flex-wrap: nowrap;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    display: none;
    height: auto;
    min-height: 0;
  }

  .admin-shell.is-nav-open .admin-sidebar {
    display: flex;
  }

  .admin-menu-toggle {
    display: inline-flex;
  }

  .admin-topbar {
    position: sticky;
  }

  .admin-split {
    grid-template-columns: 1fr;
  }

  .inbox-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .container,
  .reading-container {
    width: min(calc(100% - 28px), var(--content-width));
  }

  .site-main {
    padding-block: 28px 56px;
  }

  .site-header__actions .button--secondary,
  .site-header__actions .btn-secondary {
    display: none;
  }

  .brand__name {
    font-size: 1rem;
  }

  .topic-bar__inner {
    min-height: 46px;
  }

  .hero__inner {
    padding-block: 45px;
  }

  .hero h1 {
    font-size: clamp(2.4rem, 12vw, 3.5rem);
  }

  .hero__feature,
  .hero__feature img {
    min-height: 255px;
  }

  .section-header,
  .admin-page-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-header__actions,
  .admin-page-header__actions {
    justify-content: flex-start;
  }

  .post-grid,
  .post-grid--two,
  .category-grid,
  .media-grid {
    grid-template-columns: 1fr;
  }

  .post-card--horizontal,
  .post-card--featured {
    grid-template-columns: 1fr;
  }

  .post-card--horizontal .post-card__image,
  .post-card--featured .post-card__image {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .post-card--featured h2,
  .post-card--featured h3 {
    font-size: 1.85rem;
  }

  .newsletter__form {
    flex-direction: column;
  }

  .newsletter__form button {
    width: 100%;
  }

  .article-header h1 {
    font-size: clamp(2.25rem, 11vw, 3.55rem);
  }

  .article-content,
  .post-content,
  .prose {
    font-size: 1.08rem;
  }

  .article-cover {
    margin-right: -14px;
    margin-left: -14px;
    border-radius: 0;
  }

  .form-grid,
  .form-grid--three {
    grid-template-columns: 1fr;
  }

  .form-field--full {
    grid-column: auto;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .button,
  .form-actions .btn {
    flex: 1 1 auto;
  }

  .admin-topbar {
    min-height: 63px;
    padding: 10px 14px;
  }

  .admin-topbar__actions .button--secondary,
  .admin-topbar__actions .btn-secondary {
    display: none;
  }

  .admin-content {
    padding: 20px 14px 34px;
  }

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

  .admin-grid > [class*="span-"],
  .admin-grid > [class*="col-"] {
    grid-column: auto;
  }

  .stat-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
  }

  .stat-card__value {
    font-size: 1.48rem;
  }

  .admin-card__head,
  .panel__head,
  .admin-card__body,
  .panel__body,
  .admin-card__foot,
  .panel__foot {
    padding-right: 15px;
    padding-left: 15px;
  }

  .inbox-layout {
    display: block;
    min-height: 0;
  }

  .inbox-list {
    max-height: 350px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .message-thread {
    min-height: 540px;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 30px 18px;
  }

  .site-footer__bottom {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 430px) {
  .site-header__actions .button,
  .site-header__actions .btn {
    min-height: 36px;
    padding: 7px 9px;
    font-size: 0.78rem;
  }

  .hero__actions .button,
  .hero__actions .btn {
    width: 100%;
  }

  .hero__feature-copy {
    right: 17px;
    bottom: 17px;
    left: 17px;
  }

  .hero__feature-copy h2 {
    font-size: 1.32rem;
  }

  .post-card__body {
    padding: 17px;
  }

  .post-card h2,
  .post-card h3 {
    font-size: 1.28rem;
  }

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

  .approval-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .approval-card__time {
    grid-column: 2;
  }

  .approval-card__actions {
    grid-column: 1 / -1;
  }

  .site-footer__inner {
    grid-template-columns: 1fr;
  }
}

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