/* ─── Agadir Mag · editorial identity (Atlantic palette) ─── */

/* Self-hosted variable fonts — latin subset, served same-origin to avoid
   the cross-origin handshake to fonts.gstatic.com on LCP. */
@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 500;
  font-display: swap;
  src: url("/fonts/fraunces.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 500;
  font-display: swap;
  src: url("/fonts/fraunces-italic.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/newsreader.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/newsreader-italic.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Reem Kufi';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/reem-kufi.woff2") format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* palette — Atlantic coast, sun on white walls */
  --surface:    #f5f7fa;        /* cream-white */
  --surface-2:  #e6edf5;        /* paler-blue surface */
  --ink:        #0a1929;        /* near-black navy */
  --ink-soft:   #2a3f55;        /* softened navy text */
  --primary:    #1e4d7b;        /* deep Atlantic — signature */
  --deep:       #0d2c4a;        /* hover / strong navy */
  --accent:     #4ea0c8;        /* sky / sea-foam */
  --majorelle:  #163e6e;        /* mid navy, harmonized */
  --soft:       #8fb8d4;        /* muted blue */
  --seaglass:   #5a8fa6;        /* tertiary teal accent */

  /* type */
  --display: 'Fraunces', 'Times New Roman', serif;
  --body:    'Newsreader', Georgia, serif;
  --kufi:    'Reem Kufi', 'Fraunces', serif;

  /* rhythm */
  --measure: 38rem;
  --gutter:  clamp(1.25rem, 5vw, 2.5rem);

  --grain: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.06  0 0 0 0 0.10  0 0 0 0 0.16  0 0 0 0.04 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--surface);
  background-image: var(--grain);
  background-size: 160px 160px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 18px;
  line-height: 1.6;
  font-feature-settings: "kern", "liga", "onum";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent); }

::selection { background: var(--primary); color: var(--surface); }

/* ─── headings */
h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 460;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 0;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.05;
  margin: 0 0 .5em;
}

h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); font-weight: 380; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 460; font-variation-settings: "opsz" 60, "SOFT" 30; }
h3 { font-size: 1.3rem; font-weight: 500; }

/* ─── containers */
.shell  { max-width: 78rem; margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); margin: 0 auto; }

/* ─── eyebrow / kicker labels */
.eyebrow {
  font-family: var(--kufi);
  font-size: .72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--deep);
  font-weight: 600;
}

.dateline {
  font-family: var(--display);
  font-style: italic;
  font-size: .85rem;
  color: var(--ink-soft);
  font-variation-settings: "opsz" 14;
}

/* ─── prose for article body */
.prose { font-size: 1.125rem; line-height: 1.75; color: var(--ink); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { margin-top: 2.4em; padding-top: .4em; border-top: 1px solid color-mix(in srgb, var(--ink) 18%, transparent); }
.prose h3 { margin-top: 1.8em; }
.prose p > strong { color: var(--deep); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose blockquote {
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 96, "SOFT" 50;
  font-size: 1.5rem;
  line-height: 1.35;
  border-left: 3px solid var(--primary);
  padding: .25em 0 .25em 1.2em;
  color: var(--ink-soft);
  margin: 2em 0;
}
.prose figure { margin: 2em 0; }
.prose figcaption {
  font-style: italic;
  font-size: .9rem;
  color: var(--ink-soft);
  margin-top: .5em;
  text-align: center;
}

/* drop cap on first paragraph after the lede separator */
.prose .lede + p::first-letter,
.prose .leading::first-letter {
  font-family: var(--display);
  font-weight: 380;
  float: left;
  font-size: 4.6em;
  line-height: 0.85;
  margin: 0.08em 0.08em 0 -0.05em;
  color: var(--primary);
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
}

/* ─── stamps & ornaments */
.stamp {
  display: inline-block;
  border: 1px solid var(--ink);
  padding: .35em .7em;
  font-family: var(--kufi);
  font-size: .72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: var(--surface);
  transform: rotate(-3deg);
  box-shadow: 2px 2px 0 var(--primary);
}

.rule-stars {
  display: flex; align-items: center; gap: .8rem;
  color: var(--primary);
  margin: 2.5rem 0;
}
.rule-stars::before, .rule-stars::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, currentColor, transparent);
  opacity: .55;
}

/* ─── card grid (mobile-first) */
.feed { display: grid; gap: 2.4rem; }
@media (min-width: 720px) { .feed { grid-template-columns: repeat(6, 1fr); gap: 2rem 1.6rem; } }

/* ─── clean travel card */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -18px rgba(10, 25, 41, .22);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}
.card:hover .card__title { color: var(--deep); }

.card__media {
  position: relative;
  background: var(--surface-2);
  aspect-ratio: 4/5;
  overflow: hidden;
}
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.card:hover .card__media img { transform: scale(1.04); }

/* Category — kufic chip top-left */
.card__cat {
  position: absolute; top: .85rem; left: .85rem;
  background: var(--surface);
  color: var(--deep);
  font-family: var(--kufi);
  font-size: .62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: .35em .75em;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  z-index: 3;
}

.card__title {
  font-family: var(--display);
  font-size: 1.4rem; line-height: 1.2; font-weight: 460;
  letter-spacing: -0.015em;
  margin: 1.1rem 1.1rem .55rem;
  font-variation-settings: "opsz" 60, "SOFT" 30;
  transition: color .3s;
}
.card__desc {
  font-size: .98rem; color: var(--ink-soft); line-height: 1.55;
  margin: 0 1.1rem 1.3rem;
}

/* asymmetric magazine spans (desktop) */
@media (min-width: 720px) {
  .feed > *:nth-child(1) { grid-column: span 4; }
  .feed > *:nth-child(1) .card__media { aspect-ratio: 16/11; }
  .feed > *:nth-child(1) .card__title { font-size: 2.6rem; }
  .feed > *:nth-child(2) { grid-column: span 2; }
  .feed > *:nth-child(3) { grid-column: span 2; }
  .feed > *:nth-child(4) { grid-column: span 2; }
  .feed > *:nth-child(5) { grid-column: span 2; }
  .feed > *:nth-child(6) { grid-column: span 3; }
  .feed > *:nth-child(7) { grid-column: span 3; }
  .feed > *:nth-child(n+8) { grid-column: span 2; }
}

/* ─── hero — pro travel: full-bleed photo + dark overlay + light text */
.hero {
  position: relative;
  isolation: isolate;
  padding: 6.5rem 0 5.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--surface);
}
.hero__bg {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  z-index: -2;
}
/* legibility gradient — bottom-heavy, light vignette top */
.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  z-index: -1;
  background:
    linear-gradient(180deg,
      rgba(10, 25, 41, .35) 0%,
      rgba(10, 25, 41, .15) 35%,
      rgba(10, 25, 41, .55) 100%);
}
.hero__ornament {
  color: var(--surface);
  margin-bottom: 1.4rem;
  opacity: .95;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.35));
}
.hero .eyebrow {
  color: var(--surface);
  opacity: .92;
  text-shadow: 0 1px 2px rgba(0,0,0,.4);
}
.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5rem);
  font-weight: 340;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144, "SOFT" 50, "WONK" 1;
  line-height: 1.02;
  max-width: 18ch;
  margin: .9rem auto 0;
  color: var(--surface);
  text-shadow: 0 2px 16px rgba(0,0,0,.35);
}
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  font-weight: 320;
}
.hero__lede {
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 14;
  font-size: 1.1rem;
  color: color-mix(in srgb, var(--surface) 92%, transparent);
  max-width: 36rem;
  margin: 1.4rem auto 0;
  line-height: 1.55;
  text-shadow: 0 1px 8px rgba(0,0,0,.45);
}
.hero__meta {
  display: flex;
  gap: 1.2rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}
/* re-skin the stamp and dateline for dark bg */
.hero .stamp {
  background: rgba(255, 255, 255, .08);
  border-color: var(--surface);
  color: var(--surface);
  box-shadow: 2px 2px 0 var(--accent);
  backdrop-filter: blur(4px);
}
.hero .dateline {
  color: color-mix(in srgb, var(--surface) 80%, transparent);
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
}

/* ─── hero — mobile */
@media (max-width: 720px) {
  .hero { padding: 4rem 1.25rem 3.25rem; }
  .hero__ornament { margin-bottom: 1rem; }
  .hero h1 {
    font-size: clamp(2.1rem, 8vw, 3rem);
    line-height: 1.05;
    max-width: 20ch;
    letter-spacing: -0.02em;
  }
  .hero h1 br { display: none; }
  .hero__lede { font-size: 1rem; margin-top: 1rem; }
  .hero__meta { margin-top: 1.4rem; gap: .7rem; }
  .hero__bg { object-position: center; }
  .hero::after {
    background:
      linear-gradient(180deg,
        rgba(10, 25, 41, .45) 0%,
        rgba(10, 25, 41, .25) 40%,
        rgba(10, 25, 41, .65) 100%);
  }
}

/* ─── article page header */
.article-head {
  padding: 3.5rem 0 1.5rem;
  text-align: center;
  position: relative;
}
.article-head .stamp { margin-bottom: 1.5rem; }
.article-head h1 {
  font-size: clamp(2.2rem, 6vw, 4.2rem);
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  max-width: 22ch;
  margin: 0 auto;
}
.article-head .dek {
  font-family: var(--display); font-style: italic;
  font-size: 1.2rem; color: var(--ink-soft);
  margin-top: 1rem; max-width: 38rem; margin-left:auto; margin-right:auto;
  font-variation-settings: "opsz" 14;
}
.article-head .meta {
  margin-top: 1.5rem; display: flex; gap: 1rem; justify-content: center; align-items: center;
  font-size: .85rem; color: var(--ink-soft);
}
.article-head .meta span + span::before { content: "·"; margin-right: 1rem; color: var(--primary); }

.article-cover { margin: 1rem auto 2rem; max-width: 56rem; }
.article-cover img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.article-cover figcaption {
  font-family: var(--display); font-style: italic; font-variation-settings: "opsz" 14;
  font-size: .82rem; color: var(--ink-soft); text-align: right; margin-top: .5rem;
}

/* ─── related */
.related { border-top: 1px solid color-mix(in srgb, var(--ink) 15%, transparent); padding: 3rem 0 1rem; margin-top: 4rem; }

/* ─── reveal — slide-only, no opacity fade so text is paintable at frame 1 (LCP) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { transform: translateY(14px); animation: rise 0.9s cubic-bezier(.2,.7,.2,1) forwards; }
  .reveal-1 { animation-delay: .05s; }
  .reveal-2 { animation-delay: .18s; }
  .reveal-3 { animation-delay: .32s; }
  .reveal-4 { animation-delay: .46s; }
}
@keyframes rise { to { transform: none; } }

/* ─── flash + small additions for Rails */
.flash {
  background: var(--primary); color: var(--surface);
  font-family: var(--kufi); font-size: .82rem; letter-spacing: .15em;
  text-transform: uppercase; padding: .9rem var(--gutter); text-align: center;
}
.feed-head {
  display: flex; justify-content: space-between; align-items: end;
  margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem;
}
.feed-head h2 { margin: .4rem 0 0; }

/* ─── masthead */
.masthead { padding: 1.4rem 0 .8rem; }
.mast-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: .9rem;
  text-align: center;
}
@media (min-width: 720px) {
  .mast-row { grid-template-columns: 1fr auto 1fr; }
  .mast-meta { text-align: left; }
  .mast-nav  { justify-content: flex-end; }
}
.mast-logo {
  display: inline-flex; align-items: center; justify-content: center; gap: .9rem;
  font-family: var(--display);
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 1;
  font-size: 2rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
.mast-word em { font-style: italic; color: var(--primary); }
.mast-nav { display: flex; gap: 1.5rem; justify-content: center; align-items: center; }
.mast-nav a {
  font-family: var(--kufi); font-size: .8rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: border-color .25s, color .25s;
}
.mast-nav a:hover { border-color: var(--primary); color: var(--deep); }
.mast-rule {
  margin-top: 1.2rem;
  height: 6px;
  background-image:
    linear-gradient(90deg, var(--ink) 0 100%),
    linear-gradient(90deg, var(--primary) 0 100%);
  background-size: 100% 1px, 100% 1px;
  background-position: 0 0, 0 5px;
  background-repeat: no-repeat;
}

/* ─── footer */
.foot {
  margin-top: 6rem;
  padding: 4rem 0 3rem;
  background: var(--ink);
  color: var(--surface);
}
.foot-grid {
  display: grid; gap: 2.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 3rem; }
}
.foot-mark .foot-name {
  font-family: var(--display);
  font-weight: 380;
  font-variation-settings: "opsz" 144, "SOFT" 80;
  font-size: 2rem;
  margin: .8rem 0 .4rem;
}
.foot-mark em { color: var(--primary); font-style: italic; }
.foot-tag {
  color: color-mix(in srgb, var(--surface) 70%, transparent);
  max-width: 28ch;
  font-style: italic;
  font-family: var(--display);
  font-variation-settings: "opsz" 14;
}
.foot-nav { display: flex; flex-direction: column; gap: .5rem; }
.foot-nav h4 {
  font-family: var(--kufi); font-size: .72rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--accent); margin: 0 0 .8rem;
}
.foot-nav a {
  color: var(--surface); text-decoration: none; font-size: .95rem;
  border-bottom: 1px solid transparent; align-self: flex-start;
  transition: border-color .25s, color .25s;
}
.foot-nav a:hover { border-color: var(--primary); color: var(--soft); }
.foot-fine {
  grid-column: 1 / -1; padding-top: 2rem;
  border-top: 1px solid color-mix(in srgb, var(--surface) 14%, transparent);
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem;
  font-size: .82rem;
  color: color-mix(in srgb, var(--surface) 60%, transparent);
}
.foot-arabic {
  font-family: var(--kufi); font-size: 1.6rem; color: var(--primary); margin: 0;
  direction: rtl;
}

/* ─── menu: Eat link gets the tagine icon */
.mast-nav-eat {
  display: inline-flex; align-items: center; gap: .35rem;
}
.mast-nav-eat svg { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.mast-nav-eat:hover svg { transform: rotate(-8deg) scale(1.05); }

/* ─── eat index grid */
.eat-grid {
  display: grid; gap: 2.2rem;
  grid-template-columns: 1fr;
  margin-top: 2rem;
}
@media (min-width: 720px) { .eat-grid { grid-template-columns: repeat(2, 1fr); gap: 2.4rem 2rem; } }
@media (min-width: 1100px) { .eat-grid { grid-template-columns: repeat(3, 1fr); } }

.eat-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--ink) 10%, transparent);
  transition: transform .35s cubic-bezier(.2,.7,.2,1), box-shadow .35s, border-color .35s;
  overflow: hidden;
}
.eat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px -18px rgba(10, 25, 41, .22);
  border-color: color-mix(in srgb, var(--primary) 35%, transparent);
}
.eat-card__media {
  position: relative;
  background: var(--surface-2);
  aspect-ratio: 3/2;
  overflow: hidden;
}
.eat-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.eat-card:hover .eat-card__media img { transform: scale(1.04); }
.eat-card__placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
}
/* Category — kufic chip top-left, inside media */
.eat-card__cat {
  position: absolute; top: .85rem; left: .85rem;
  background: var(--surface);
  color: var(--deep);
  font-family: var(--kufi);
  font-size: .62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: .35em .75em;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  z-index: 3;
}
/* Rating — chip top-right */
.eat-card__rating {
  position: absolute; top: .85rem; right: .85rem;
  background: var(--surface); color: var(--ink);
  padding: .3em .65em;
  font-family: var(--display); font-weight: 500;
  font-size: .92rem;
  display: inline-flex; align-items: center; gap: .35rem;
  border: 1px solid color-mix(in srgb, var(--primary) 30%, transparent);
  z-index: 3;
}
.eat-card__rating small { color: var(--ink-soft); font-family: var(--body); font-weight: 400; }
.eat-card__star { color: var(--primary); }

.eat-card__body { padding: 1.2rem 1.3rem 1.3rem; flex: 1; display: flex; flex-direction: column; }
.eat-card__name {
  font-family: var(--display); font-size: 1.4rem; font-weight: 460;
  font-variation-settings: "opsz" 60, "SOFT" 30;
  letter-spacing: -0.012em; line-height: 1.2;
  margin: 0 0 .5rem;
}
.eat-card__addr {
  font-style: italic;
  color: var(--ink-soft);
  font-size: .9rem;
  margin: 0 0 .9rem;
  font-family: var(--display);
  font-variation-settings: "opsz" 14;
}
.eat-card__meta {
  list-style: none; padding: 0; margin: auto 0 0;
  display: flex; flex-direction: column; gap: .35rem;
  font-size: .92rem;
  border-top: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  padding-top: .9rem;
}
.eat-card__meta li { display: flex; align-items: center; gap: .55rem; color: var(--ink-soft); }
.eat-card__meta a { color: var(--ink); text-decoration: none; border-bottom: 1px solid transparent; }
.eat-card__meta a:hover { border-color: var(--primary); color: var(--deep); }
.eat-card__meta span[aria-hidden] { color: var(--primary); width: 1em; flex-shrink: 0; }

/* ─── restaurants show page */
.rest-layout {
  display: grid; gap: 3rem;
  grid-template-columns: 1fr;
  margin-top: 1rem;
}
@media (min-width: 920px) {
  .rest-layout { grid-template-columns: minmax(0, 1fr) 19rem; gap: 4rem; align-items: start; }
}

.rest-main { min-width: 0; }
.rest-section { margin-bottom: 3.2rem; }
.rest-section .eyebrow { display: block; margin-bottom: .9rem; }
.rest-empty .dateline { font-size: 1rem; color: var(--ink-soft); padding: 1rem 0 0; border-left: 3px solid var(--accent); padding-left: 1rem; }

/* aside / quick facts */
.rest-aside { position: sticky; top: 1.5rem; }
@media (max-width: 919px) { .rest-aside { position: static; } }
.rest-card {
  border: 1px solid color-mix(in srgb, var(--ink) 14%, transparent);
  background: var(--surface);
  padding: 1.4rem 1.5rem;
}
.rest-card .eyebrow { margin-bottom: 1rem; display: block; }
.rest-facts { margin: 0; display: grid; gap: .9rem .8rem; grid-template-columns: max-content 1fr; }
.rest-facts dt {
  font-family: var(--kufi); font-size: .68rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--ink-soft);
  align-self: start; padding-top: .15em;
}
.rest-facts dd { margin: 0; font-size: .95rem; line-height: 1.4; }
.rest-facts dd a { color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--primary); }
.rest-facts dd a:hover { color: var(--deep); }

.rest-tag {
  display: inline-block;
  font-family: var(--kufi); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--deep);
  background: var(--surface-2); padding: .2em .5em;
  margin: 0 .2em .25em 0;
}

/* gallery — magazine asymmetry */
.rest-gallery {
  display: grid; gap: .9rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 720px) {
  .rest-gallery { grid-template-columns: repeat(6, 1fr); grid-auto-rows: 12rem; }
  .rest-gallery__item--1 { grid-column: span 4; grid-row: span 2; }
  .rest-gallery__item--2 { grid-column: span 2; }
  .rest-gallery__item--3 { grid-column: span 2; }
  .rest-gallery__item--4 { grid-column: span 3; }
  .rest-gallery__item--5 { grid-column: span 3; }
  .rest-gallery__item--6 { grid-column: span 2; }
}
.rest-gallery__item { position: relative; margin: 0; overflow: hidden; background: var(--surface-2); }
.rest-gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s cubic-bezier(.2,.7,.2,1); display: block; }
.rest-gallery__item:hover img { transform: scale(1.04); }
.rest-gallery__item figcaption {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: .35rem .6rem;
  font-family: var(--display); font-style: italic; font-size: .72rem;
  font-variation-settings: "opsz" 14;
  color: var(--surface);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.55));
  opacity: 0; transition: opacity .35s;
  text-align: right;
}
.rest-gallery__item:hover figcaption { opacity: 1; }

/* reviews */
.rest-reviews { display: flex; flex-direction: column; gap: 1.6rem; }
.rest-review {
  background: var(--surface);
  border-left: 3px solid var(--primary);
  padding: 1rem 1.2rem 1.1rem;
}
.rest-review__head {
  display: flex; gap: .9rem; align-items: baseline; flex-wrap: wrap;
  margin-bottom: .6rem;
  font-size: .92rem;
}
.rest-review__rating { color: var(--primary); letter-spacing: .05em; }
.rest-review__author { color: var(--ink); font-weight: 500; }
.rest-review__author a { color: inherit; text-decoration: none; border-bottom: 1px dotted; }
.rest-review__when { color: var(--ink-soft); font-style: italic; font-family: var(--display); font-variation-settings: "opsz" 14; }
.rest-review__body {
  font-family: var(--display);
  font-style: italic;
  font-variation-settings: "opsz" 24, "SOFT" 30;
  font-size: 1.05rem;
  line-height: 1.55;
  margin: 0;
  color: var(--ink-soft);
  border: none;
  padding: 0;
}
.rest-review__body::before, .rest-review__body::after { content: ""; }

/* CTA on index card */
.eat-card__cta {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px dashed color-mix(in srgb, var(--ink) 22%, transparent);
  font-family: var(--kufi); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--deep);
}

/* ─── menu: Stay link gets the keyhole-arch icon */
.mast-nav-stay {
  display: inline-flex; align-items: center; gap: .35rem;
}
.mast-nav-stay svg { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.mast-nav-stay:hover svg { transform: translateY(-2px); }

/* ─── menu: Do link gets the balloon icon */
.mast-nav-do {
  display: inline-flex; align-items: center; gap: .35rem;
}
.mast-nav-do svg { transition: transform .35s cubic-bezier(.2,.7,.2,1); }
.mast-nav-do:hover svg { transform: translateY(-3px) rotate(-4deg); }

/* ─── auto entity-links inside post body */
.prose a.entity-link {
  color: var(--ink);
  text-decoration: none;
  background: linear-gradient(transparent 60%, color-mix(in srgb, var(--primary) 18%, transparent) 60%);
  background-size: 100% 100%;
  transition: color .25s, background-color .25s;
}
.prose a.entity-link:hover {
  color: var(--deep);
  background: linear-gradient(transparent 60%, color-mix(in srgb, var(--primary) 38%, transparent) 60%);
}

/* ─── author profile page */
.author-page { padding: 3rem 0 4rem; }
.author-head { text-align: center; margin-bottom: 3rem; }
.author-photo {
  width: 9rem; height: 9rem; border-radius: 50%;
  object-fit: cover; margin: 0 auto 1.25rem;
  border: 1px solid var(--primary);
  padding: .35rem; background: var(--surface);
}
.author-head h1 {
  font-family: var(--display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  margin: .5rem 0 .25rem;
}
.author-page .prose.measure { margin: 1.25rem auto 0; max-width: 36rem; text-align: left; }
.author-socials {
  list-style: none; padding: 0; margin: 1.5rem 0 0;
  display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
  font-family: var(--kufi); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase;
}
.author-socials a { color: var(--deep); text-decoration: none; border-bottom: 1px solid var(--primary); padding-bottom: 2px; }

/* ─── methodology page */
.methodology { padding: 3rem 0 4rem; }
.methodology h2 {
  font-family: var(--display);
  font-weight: 380;
  font-variation-settings: "opsz" 60, "SOFT" 30;
  margin-top: 2.4em;
}

/* ─── featured stories rail (home page carousel) */
.featured { padding-top: .5rem; padding-bottom: 1rem; }
.featured .feed-head { display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: .75rem; margin-bottom: 1.25rem; }
.featured .feed-head .dateline { font-size: .75rem; opacity: .6; }

.story-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 82%;
  gap: 1.25rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: .25rem .25rem 1.5rem;
  margin: 0 -.25rem;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--ink) 25%, transparent) transparent;
}
.story-rail::-webkit-scrollbar { height: 6px; }
.story-rail::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--ink) 25%, transparent); border-radius: 3px; }
.story-rail > .card { scroll-snap-align: start; }

@media (min-width: 720px) {
  .story-rail { grid-auto-columns: 44%; gap: 1.5rem; }
}
@media (min-width: 1100px) {
  .story-rail { grid-auto-columns: 30%; gap: 1.75rem; }
}

/* ─── post card placeholder when cover_url is blank */
.card__placeholder {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--deep));
  color: var(--surface);
}
