/* =========================================================
   Qurikvoy — Editorial Magazine (The Field Chronicles)
   desktop ≥1024 · tablet 768–1023 · mobile ≤767
   ========================================================= */
.page-mag {
  --m-ink: #0f172a;
  --m-black: #111;
  --m-slate: #475569;
  --m-muted: #64748b;
  --m-soft: #94a3b8;
  --m-blue: #005a9a;
  --m-rust: #9a3800;
  --m-amber: #fbbf24;
  --m-amber-2: #fcd34d;
  --m-paper: #faf9f7;
  --m-line: rgba(26, 26, 26, 0.08);
  --m-shadow: 0 2px 12px -2px rgba(15, 23, 42, 0.04), 0 1px 3px -1px rgba(15, 23, 42, 0.02);
  --m-shadow-hover: 0 24px 44px -24px rgba(15, 23, 42, 0.35);
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  background: var(--m-paper);
}

/* ---------- shared ---------- */
.mg-pill { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); font-size: 11px; font-weight: 700; line-height: 16.5px; letter-spacing: 0.55px; color: var(--m-black); white-space: nowrap; }
.mg-pill--blue { background: var(--m-blue); color: #fff; font-weight: 600; letter-spacing: 0; }
.mg-pill--sm { letter-spacing: 0; color: var(--m-ink); }
.mg-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; line-height: 18px; color: var(--m-ink); white-space: nowrap; }
.mg-link img { flex: none; transition: transform 0.25s var(--ease); }
.mg-link:hover img { transform: translateX(3px); }
.mg-link--blue { font-size: 13px; color: var(--m-blue); }
.mg-link--amber { color: var(--m-amber-2); }
.page-mag .bl-save { position: absolute; right: 20px; top: 20px; z-index: 2; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.22); transition: background 0.2s, transform 0.2s var(--ease); }
.page-mag .bl-save:hover { background: rgba(255, 255, 255, 0.35); transform: scale(1.06); }
.page-mag .bl-save.is-saved { background: #bf4b0e; }

/* =========================================================
   1. MASTHEAD + COVER
   ========================================================= */
.mg-top { padding: 32px 0 48px; }
.mg-mast { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 40px; padding-bottom: 25px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.mg-mast__kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11px; font-weight: 700; line-height: 16.5px; letter-spacing: 2.75px; text-transform: uppercase; color: var(--m-rust); }
.mg-mast__kicker img { flex: none; }
.mg-mast h1 { margin: 0; font-family: var(--serif); font-size: 60px; line-height: 60px; font-weight: 500; letter-spacing: -1.5px; color: var(--m-black); }
.mg-mast h1 em { font-style: italic; color: var(--m-slate); }
.mg-mast__text { max-width: 448px; font-size: 13px; line-height: 21px; text-align: right; color: var(--m-slate); }

.mg-hero { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: 20px; align-items: start; margin-top: 32px; }
.mg-cover { overflow: hidden; border: 1px solid var(--m-line); border-radius: 24px; background: #fff; box-shadow: var(--m-shadow); }
.mg-cover__media { position: relative; height: 460px; overflow: hidden; background: #e2e8f0; }
.mg-cover__img { display: block; height: 100%; }
.mg-cover__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease); }
.mg-cover:hover .mg-cover__img img { transform: scale(1.04); }
.mg-cover__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.35) 50%, rgba(0, 0, 0, 0) 100%); pointer-events: none; }
.mg-cover__badges { position: absolute; left: 20px; top: 20px; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.mg-cover__overlay { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 1; display: flex; flex-direction: column; gap: 12px; }
.mg-cover__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; font-weight: 500; line-height: 18px; color: rgba(255, 255, 255, 0.8); }
.mg-cover__meta span { display: inline-flex; align-items: center; gap: 4px; }
.mg-cover__meta i { font-style: normal; }
.mg-cover h2 { margin: 0; font-family: var(--serif); font-size: 36px; line-height: 40px; font-weight: 500; color: #fff; }
.mg-cover h2 a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }
.mg-cover__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px 20px; padding: 28px; }
.mg-author { display: flex; align-items: center; gap: 12px; }
.mg-author img { width: 44px; height: 44px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 50%; object-fit: cover; object-position: center top; background: #f1f5f9; }
.mg-author span { display: flex; flex-direction: column; }
.mg-author strong { font-size: 13px; font-weight: 700; line-height: 19.5px; color: var(--m-ink); }
.mg-author small { font-size: 11px; line-height: 16.5px; color: var(--m-muted); }
.mg-cover__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.mg-verified { padding: 5px 11px; border: 1px solid rgba(167, 243, 208, 0.6); border-radius: 999px; background: #ecfdf5; font-size: 12px; font-weight: 600; line-height: 18px; color: #059669; }

.mg-side { display: flex; flex-direction: column; gap: 20px; }
.mg-note { position: relative; display: flex; flex-direction: column; gap: 12px; overflow: hidden; padding: 25px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px; background: #19222c; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); }
.mg-note__glow { position: absolute; right: -60px; bottom: -60px; width: 230px; height: 230px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 90, 154, 0.38) 0%, rgba(0, 90, 154, 0) 65%); pointer-events: none; }
.mg-note > *:not(.mg-note__glow) { position: relative; }
.mg-note__top { display: flex; align-items: center; justify-content: space-between; }
.mg-note__top p { font-size: 11px; font-weight: 700; line-height: 16.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--m-amber); }
.mg-note blockquote { margin: 4px 0 0; font-family: var(--serif); font-size: 20px; line-height: 27.5px; font-weight: 500; color: #fff; }
.mg-note__text { font-size: 12px; line-height: 19.5px; color: rgba(255, 255, 255, 0.7); }
.mg-note__foot { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding-top: 21px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 11px; line-height: 16.5px; color: rgba(255, 255, 255, 0.5); }
.mg-note__foot a { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; line-height: 18px; color: var(--m-amber); }
.mg-note__foot a:hover img { transform: translateX(3px); }
.mg-note__foot img { transition: transform 0.25s var(--ease); }

.mg-mini { display: flex; align-items: center; gap: 16px; padding: 21px; border: 1px solid var(--m-line); border-radius: 24px; background: #fff; box-shadow: var(--m-shadow); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease); }
.mg-mini:hover { transform: translateY(-3px); box-shadow: var(--m-shadow-hover); }
.mg-mini__img { position: relative; flex: none; width: 96px; height: 96px; overflow: hidden; border-radius: 16px; background: #e2e8f0; }
.mg-mini__img img { width: 100%; height: 100%; object-fit: cover; }
.mg-mini__img b { position: absolute; right: 4px; bottom: 4px; padding: 2px 6px; border-radius: 4px; background: rgba(0, 0, 0, 0.7); font-size: 9px; font-weight: 700; line-height: 13.5px; color: #fff; }
.mg-mini__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mg-mini__body small { font-size: 11px; font-weight: 500; line-height: 16.5px; color: var(--m-soft); }
.mg-mini__body strong { overflow: hidden; font-family: var(--serif); font-size: 15px; line-height: 20.6px; font-weight: 500; color: var(--m-ink); white-space: nowrap; text-overflow: ellipsis; }
.mg-mini__body > span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 16.5px; color: var(--m-muted); }

/* =========================================================
   2. RIBBON
   ========================================================= */
.mg-ribbon { position: relative; z-index: 20; padding: 15px 0; border-top: 1px solid rgba(0, 0, 0, 0.06); border-bottom: 1px solid rgba(0, 0, 0, 0.06); background: rgba(250, 249, 247, 0.97); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); scroll-margin-top: 80px; }
.mg-native-sticky .mg-ribbon { position: sticky; top: var(--mg-top, 64px); }
.mg-ribbon .container { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; }
.mg-ribbon__pills { display: flex; gap: 8px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mg-ribbon__pills::-webkit-scrollbar { display: none; }
.mg-chip { flex: none; padding: 8px 16px; border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 999px; background: #fff; font-size: 12px; font-weight: 500; line-height: 18px; color: #334155; transition: background 0.2s, color 0.2s, border-color 0.2s; }
.mg-chip:hover { border-color: #334155; }
.mg-chip.is-active { border-color: #121316; background: #121316; color: #fff; font-weight: 700; }
.mg-ribbon__count { display: flex; flex: none; align-items: center; gap: 12px; font-size: 12px; font-weight: 500; line-height: 18px; color: var(--m-muted); }
.mg-ribbon__count b { color: var(--m-ink); }
.mg-ribbon__count i { font-style: normal; color: #cbd5e1; }
.mg-ribbon__verified { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: #334155; }

/* =========================================================
   3. GRID
   ========================================================= */
.mg-grid-sec { padding: 48px 0 16px; }
.mg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 24px; align-items: stretch; }
.mg-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--m-line); border-radius: 24px; background: #fff; box-shadow: var(--m-shadow); transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.mg-card:hover { transform: translateY(-4px); box-shadow: var(--m-shadow-hover); }
.mg-card__media { position: relative; height: 240px; overflow: hidden; background: #e2e8f0; }
.mg-card__media > a { display: block; height: 100%; }
.mg-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease); }
.mg-card:hover .mg-card__media > a img { transform: scale(1.05); }
.mg-card__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 50%); pointer-events: none; }
.mg-card__media .mg-pill { position: absolute; left: 16px; top: 16px; z-index: 1; }
.mg-card__imgmeta { position: absolute; left: 16px; right: 16px; bottom: 12px; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 500; line-height: 16.5px; color: #fff; pointer-events: none; }
.mg-card__imgmeta span { display: inline-flex; align-items: center; gap: 6px; }
.mg-card__imgmeta img { width: 11.667px; height: 11.667px; }
.mg-card__body { flex: 1; display: flex; flex-direction: column; gap: 8px; padding: 23px 24px 24px; }
.mg-card__kicker { font-size: 11px; font-weight: 700; line-height: 16.5px; letter-spacing: 0.55px; text-transform: uppercase; }
.mg-card__kicker.is-blue { color: var(--m-blue); }
.mg-card__kicker.is-navy { color: #286197; }
.mg-card__kicker.is-rust { color: #b42318; }
.mg-card__kicker.is-ember { color: #c2410c; }
.mg-card__kicker.is-green { color: #047857; }
.mg-card h3 { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 27.5px; font-weight: 500; color: var(--m-ink); }
.mg-card h3 a { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.35s var(--ease); }
.mg-card h3 a:hover { background-size: 100% 1px; }
.mg-card__excerpt { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: 13px; line-height: 21px; color: var(--m-slate); }
.mg-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 24px 24px; border-top: 1px solid #f1f5f9; }
.mg-card__foot > span { min-width: 0; overflow: hidden; font-size: 11px; font-weight: 500; line-height: 16.5px; color: var(--m-soft); white-space: nowrap; text-overflow: ellipsis; }

.mg-card--dark { border-color: #1e293b; background: linear-gradient(129deg, #101924 0%, #1a2838 100%); }
.mg-card--dark .mg-card__body { padding: 28px; }
.mg-card__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mg-amber-pill { padding: 5px 13px; border: 1px solid rgba(251, 191, 36, 0.3); border-radius: 999px; background: rgba(251, 191, 36, 0.2); font-size: 11px; font-weight: 700; line-height: 16.5px; color: var(--m-amber-2); }
.mg-card--dark .mg-card__meta { padding-top: 15px; font-size: 11px; line-height: 16.5px; color: rgba(255, 255, 255, 0.5); }
.mg-card--dark h3 { font-size: 24px; line-height: 33px; color: #fff; }
.mg-card--dark .mg-card__excerpt { margin-bottom: 8px; color: #cbd5e1; }
.mg-card__plan { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-top: auto; padding: 17px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 16px; background: rgba(255, 255, 255, 0.1); }
.mg-card__plan span { font-size: 12px; font-weight: 500; line-height: 18px; color: rgba(255, 255, 255, 0.7); }
.mg-card__plan b { font-size: 14px; line-height: 20px; color: var(--m-amber-2); }
.mg-card--dark .mg-card__foot { padding: 9px 28px 24px; border-top-color: rgba(255, 255, 255, 0.1); }
.mg-card--dark .mg-card__foot > span { color: rgba(255, 255, 255, 0.5); }

.mg-pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 48px; padding-top: 33px; border-top: 1px solid rgba(0, 0, 0, 0.08); }
.mg-pager > p { font-size: 12px; font-weight: 500; line-height: 18px; color: var(--m-muted); }
.mg-pager > p b { color: var(--m-ink); }
.mg-pager__nums { display: flex; align-items: center; gap: 8px; }
.mg-pager__nums > * { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-size: 13px; font-weight: 600; line-height: 19.5px; color: #334155; transition: background 0.2s, color 0.2s; }
.mg-pager__nums a:hover { background: #fff; box-shadow: var(--m-shadow); }
.mg-pager__nums .is-current { background: #121316; color: #fff; font-weight: 700; }
.mg-pager__arrow { border: 1px solid rgba(0, 0, 0, 0.1); background: #fff; }
.mg-pager__arrow.is-off { opacity: 0.4; }
.mg-pager__arrow img.is-flip { transform: scaleX(-1); }
.mg-empty h2 { margin: 0; font-family: var(--serif); font-weight: 500; }

/* =========================================================
   4. NEWSLETTER
   ========================================================= */
.mg-news-sec { padding: 48px 0 72px; }
.mg-news { position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 32px; align-items: center; overflow: hidden; padding: 49px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px; background: linear-gradient(168deg, #0c1219 0%, #111923 50%, #0a0f16 100%); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.mg-news__glow { position: absolute; border-radius: 50%; pointer-events: none; }
.mg-news__glow--a { right: -120px; top: -120px; width: 480px; height: 480px; background: radial-gradient(circle, rgba(0, 90, 154, 0.32) 0%, rgba(0, 90, 154, 0) 65%); }
.mg-news__glow--b { left: -110px; bottom: -110px; width: 400px; height: 400px; background: radial-gradient(circle, rgba(245, 158, 11, 0.16) 0%, rgba(245, 158, 11, 0) 65%); }
.mg-news > *:not(.mg-news__glow) { position: relative; }
.mg-news__copy { display: flex; flex-direction: column; gap: 11px; }
.mg-news__kicker { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; line-height: 16.5px; letter-spacing: 2.2px; text-transform: uppercase; color: var(--m-amber); }
.mg-news__kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--m-amber); }
.mg-news h2 { margin: 0; font-family: var(--serif); font-size: 36px; line-height: 40px; font-weight: 500; color: #fff; }
.mg-news__copy > p:last-child { max-width: 576px; font-size: 13px; line-height: 21px; color: #cbd5e1; }
.mg-news__form { display: flex; flex-direction: column; gap: 12px; }
.mg-news__row { display: flex; gap: 8px; }
.mg-news__form input { flex: 1; min-width: 0; height: 48px; padding: 0 17px; border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; background: rgba(255, 255, 255, 0.1); font: inherit; font-size: 13px; color: #fff; transition: border-color 0.2s, background 0.2s; }
.mg-news__form input::placeholder { color: rgba(255, 255, 255, 0.5); }
.mg-news__form input:focus { outline: none; border-color: rgba(255, 255, 255, 0.6); background: rgba(255, 255, 255, 0.14); }
.mg-news__form.is-invalid input { border-color: #fca5a5; }
.mg-news__form button { display: inline-flex; flex: none; align-items: center; gap: 6px; height: 48px; padding: 0 24px; border-radius: 12px; background: #fff; font-size: 13px; font-weight: 700; line-height: 19.5px; color: var(--m-ink); box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1); transition: transform 0.25s var(--ease), background 0.2s; }
.mg-news__form button:hover { transform: translateY(-2px); background: #f1f5f9; }
.mg-news__form button:disabled { opacity: 0.7; transform: none; }
.mg-news__form .bl-news__msg { color: #fff; }
.mg-news__form .bl-news__msg.is-err { color: #fca5a5; }
.mg-news__notes { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; padding: 0 4px; font-size: 11px; line-height: 16.5px; color: var(--m-soft); }

/* =========================================================
   TABLET
   ========================================================= */
@media (max-width: 1023px) {
  .mg-mast { flex-direction: column; align-items: flex-start; }
  .mg-mast__text { text-align: left; }
  .mg-hero { grid-template-columns: minmax(0, 1fr); }
  .mg-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-note { grid-column: 1 / -1; }
  .mg-ribbon .container { flex-direction: column; align-items: stretch; gap: 10px; }
  .mg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mg-news { grid-template-columns: minmax(0, 1fr); padding: 36px; }
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 767px) {
  .mg-top { padding: 20px 0 32px; }
  .mg-mast { padding-bottom: 18px; }
  .mg-mast__kicker { font-size: 9.5px; letter-spacing: 1.4px; }
  .mg-mast h1 { font-size: 42px; line-height: 46px; letter-spacing: -1px; }
  .mg-hero { margin-top: 22px; gap: 16px; }
  .mg-cover { border-radius: 20px; }
  .mg-cover__media { height: 400px; }
  .mg-cover__badges { left: 14px; top: 14px; }
  .page-mag .bl-save { right: 14px; top: 14px; }
  .mg-cover__overlay { left: 16px; right: 16px; bottom: 18px; gap: 8px; }
  .mg-cover h2 { font-size: 25px; line-height: 31px; }
  .mg-cover__foot { padding: 18px 16px; }
  .mg-side { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .mg-note { padding: 22px 18px; border-radius: 20px; }
  .mg-mini { padding: 14px; gap: 14px; border-radius: 20px; }
  .mg-mini__img { width: 80px; height: 80px; }
  .mg-mini:hover, .mg-card:hover { transform: none; }

  .mg-ribbon { padding: 12px 0; }
  .mg-ribbon__pills { margin-inline: -16px; padding-inline: 16px; }
  .mg-ribbon__count { gap: 8px; font-size: 11px; }

  .mg-grid-sec { padding-top: 28px; }
  .mg-grid { grid-template-columns: 1fr; gap: 18px; }
  .mg-card { border-radius: 20px; }
  .mg-card__media { height: 220px; }
  .mg-card__body { padding: 18px 18px 20px; }
  .mg-card__foot { padding: 9px 18px 18px; }
  .mg-card--dark .mg-card__body { padding: 22px 18px; }
  .mg-card--dark h3 { font-size: 21px; line-height: 29px; }
  .mg-card--dark .mg-card__foot { padding: 9px 18px 18px; }

  .mg-pager { flex-direction: column; margin-top: 28px; padding-top: 22px; }
  .mg-pager__nums > * { width: 38px; height: 38px; }

  .mg-news-sec { padding: 32px 0 48px; }
  .mg-news { padding: 28px 18px; gap: 22px; border-radius: 20px; }
  .mg-news h2 { font-size: 26px; line-height: 32px; }
  .mg-news__row { flex-direction: column; }
  .mg-news__form button { justify-content: center; }
}

/* shared helpers also used on the blog */
.page-mag .bl-empty { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 520px; margin: 0 auto; padding: 48px 24px; border: 1px solid var(--m-line); border-radius: 24px; background: #fff; text-align: center; }
.page-mag .bl-empty p { font-size: 14px; line-height: 22px; color: var(--m-slate); }
.page-mag .bl-btn { display: inline-flex; align-items: center; padding: 12px 24px; border-radius: 12px; background: #121316; color: #fff; font-size: 14px; font-weight: 600; line-height: 20px; }
.page-mag .bl-news__msg { font-size: 12px; font-weight: 600; line-height: 16px; }
.page-mag .bl-news__msg:empty { display: none; }
