/*
  Happy Nest social and ads kit.

  Three layers, all on the theme's tokens (copied from snippets/hn-tokens.liquid so this folder
  works on its own; keep them in sync if a token changes):
  1. Guide chrome (.sg-*): the pages that present templates and examples.
  2. Creatives (.art*): the actual images, built at their real aspect ratio and scaled with
     container units. Every size is written in "design pixels" of the 1080px-wide canvas
     (calc(var(--u) * N)), so an exported PNG matches the Figma-style spec exactly.
  3. Platform mockups (.mock-*): Facebook, Instagram and Google frames around the creatives, so
     the copy is reviewed where it will be read. Engagement counts are left out on purpose.
*/

@font-face { font-family: 'Jost'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('fonts/hn-font-jost-latin.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: 'Jost'; font-style: normal; font-weight: 300 700; font-display: swap; src: url('fonts/hn-font-jost-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lora'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/hn-font-lora-latin.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: 'Lora'; font-style: normal; font-weight: 400 700; font-display: swap; src: url('fonts/hn-font-lora-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Lora'; font-style: italic; font-weight: 400 700; font-display: swap; src: url('fonts/hn-font-lora-italic-latin.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: 'Lora'; font-style: italic; font-weight: 400 700; font-display: swap; src: url('fonts/hn-font-lora-italic-latin-ext.woff2') format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  /* Primitives (snippets/hn-tokens.liquid) */
  --hn-color-lilac: #8b6f87;
  --hn-color-plum: #634f60;
  --hn-color-midnight: #2a1f3d;
  --hn-color-tan: #dabb97;
  --hn-color-snow: #f9f4f7;
  --hn-color-mist: #ece3e9;
  --hn-color-lavender: #f4eefc;
  --hn-color-white: #ffffff;
  --hn-color-line: #e3d9e1;
  --hn-color-sale: #d10b0b;
  --hn-color-midnight-rgb: 42 31 61;

  /* Semantic aliases */
  --hn-text: var(--hn-color-midnight);
  --hn-text-muted: var(--hn-color-plum); /* small text: plum passes AA, lilac doesn't */
  --hn-surface: var(--hn-color-snow);
  --hn-surface-raised: var(--hn-color-white);
  --hn-surface-muted: var(--hn-color-mist);
  --hn-border: var(--hn-color-line);
  --hn-action: var(--hn-color-plum);
  --hn-action-hover: var(--hn-color-midnight);
  --hn-accent: var(--hn-color-tan);

  --hn-font-heading: 'Lora', 'Times New Roman', serif;
  --hn-font-body: 'Jost', 'Helvetica Neue', Arial, sans-serif;

  --hn-space-1: 0.25rem;
  --hn-space-2: 0.5rem;
  --hn-space-3: 0.75rem;
  --hn-space-4: 1rem;
  --hn-space-6: 1.5rem;
  --hn-space-8: 2rem;
  --hn-space-12: 3rem;
  --hn-space-16: 4rem;
  --hn-gutter: var(--hn-space-4);

  --hn-radius-sm: 4px;
  --hn-radius: 8px;
  --hn-radius-pill: 999px;
  --hn-shadow-float: 0 8px 32px rgb(var(--hn-color-midnight-rgb) / 0.12);
  --hn-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hn-duration-fast: 160ms;
  --hn-duration: 280ms;

  /* Platform chrome: neutral grays so the mockups don't read as brand color */
  --mock-text: #1c1e21;
  --mock-muted: #65676b;
  --mock-line: #dbdde1;
  --mock-fill: #f0f2f5;
  --mock-link: #1a0dab;
  --mock-url: #4d5156;
}

@media (min-width: 750px) {
  :root { --hn-gutter: var(--hn-space-8); }
}
@media (min-width: 1200px) {
  :root { --hn-gutter: var(--hn-space-12); }
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--hn-surface);
  color: var(--hn-text);
  font: 400 1rem/1.5 var(--hn-font-body);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--hn-color-lilac); outline-offset: 2px; }
button { font: inherit; color: inherit; }

/* ── Guide chrome ──────────────────────────────────────────────────────── */
.sg-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(249 244 247 / 0.96);
  border-bottom: 1px solid var(--hn-border);
}
.sg-header__inner {
  display: flex;
  align-items: center;
  gap: var(--hn-space-6);
  max-width: 90rem;
  margin: 0 auto;
  padding: var(--hn-space-3) var(--hn-gutter);
}
.sg-header__logo { width: 4.5rem; flex: none; --hn-logo-primary: var(--hn-color-lilac); --hn-logo-accent: var(--hn-color-tan); }
.sg-nav {
  display: flex;
  gap: var(--hn-space-1);
  overflow-x: auto;
  scrollbar-width: none;
}
.sg-nav a {
  flex: none;
  padding: var(--hn-space-2) var(--hn-space-3);
  border-radius: var(--hn-radius-sm);
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--hn-duration-fast) var(--hn-ease);
}
.sg-nav a:hover { background: var(--hn-surface-muted); }
.sg-nav a[aria-current='page'] { background: var(--hn-color-midnight); color: var(--hn-color-white); }

.sg-main { max-width: 90rem; margin: 0 auto; padding: 0 var(--hn-gutter) var(--hn-space-16); }

.sg-hero { padding: var(--hn-space-12) 0 var(--hn-space-8); max-width: 48rem; }
.sg-hero h1 { font: 400 clamp(2.25rem, 1.8rem + 2vw, 3.5rem)/1.2 var(--hn-font-heading); }
.sg-hero p { margin-top: var(--hn-space-4); font-size: 1.125rem; color: var(--hn-text-muted); }

.sg-section { padding-top: var(--hn-space-12); }
.sg-section + .sg-section { border-top: 1px solid var(--hn-border); margin-top: var(--hn-space-12); }
.sg-section__head { max-width: 46rem; margin-bottom: var(--hn-space-8); }
.sg-section__head h2 { font: 400 clamp(1.75rem, 1.5rem + 1vw, 2.5rem)/1.2 var(--hn-font-heading); }
.sg-section__head p { margin-top: var(--hn-space-3); color: var(--hn-text-muted); }

.sg-h3 { font: 400 1.5rem/1.3 var(--hn-font-heading); }
.sg-kicker { font-size: 0.875rem; font-weight: 500; color: var(--hn-text-muted); }

/* Spec facts as a compact definition list */
.sg-specs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: var(--hn-space-3);
}
.sg-spec {
  padding: var(--hn-space-4);
  background: var(--hn-surface-raised);
  border-radius: var(--hn-radius);
}
.sg-spec dt { font-size: 0.875rem; color: var(--hn-text-muted); }
.sg-spec dd { margin-top: var(--hn-space-1); font-weight: 500; }

/* One example = mockup + spec column */
.sg-example {
  display: grid;
  gap: var(--hn-space-8);
  padding: var(--hn-space-8) 0;
  align-items: start;
}
.sg-example + .sg-example { border-top: 1px dashed var(--hn-border); }
@media (min-width: 990px) {
  .sg-example { grid-template-columns: minmax(0, 30rem) minmax(0, 1fr); gap: var(--hn-space-12); }
  .sg-example--wide { grid-template-columns: minmax(0, 40rem) minmax(0, 1fr); }
}
.sg-example__visual { display: grid; gap: var(--hn-space-4); justify-items: center; }
.sg-example__body { display: grid; gap: var(--hn-space-6); }
.sg-example__title { display: grid; gap: var(--hn-space-1); }

.sg-tags { display: flex; flex-wrap: wrap; gap: var(--hn-space-2); }
.sg-tag {
  padding: 0.125rem var(--hn-space-2);
  border-radius: var(--hn-radius-sm);
  background: var(--hn-surface-muted);
  font-size: 0.8125rem;
}

/* Copy fields with live character counters (assets/social.js) */
.sg-fields { display: grid; gap: var(--hn-space-3); }
.sg-field {
  padding: var(--hn-space-3) var(--hn-space-4);
  background: var(--hn-surface-raised);
  border: 1px solid var(--hn-border);
  border-radius: var(--hn-radius);
}
.sg-field__head {
  display: flex;
  justify-content: space-between;
  gap: var(--hn-space-3);
  font-size: 0.8125rem;
  color: var(--hn-text-muted);
}
.sg-field__value { margin-top: var(--hn-space-1); white-space: pre-line; overflow-wrap: anywhere; }
.sg-count { font-variant-numeric: tabular-nums; }
.sg-count.is-over { color: var(--hn-color-sale); font-weight: 500; }
.sg-list { display: grid; gap: var(--hn-space-2); padding: 0; list-style: none; }
.sg-list li {
  display: flex;
  justify-content: space-between;
  gap: var(--hn-space-3);
  padding: var(--hn-space-2) var(--hn-space-3);
  background: var(--hn-surface-raised);
  border-radius: var(--hn-radius-sm);
  font-size: 0.9375rem;
}

/* Fact checks: what was verified for this piece of copy */
.sg-checks { display: grid; gap: var(--hn-space-2); padding: 0; list-style: none; font-size: 0.9375rem; }
.sg-checks li { display: grid; grid-template-columns: 1.25rem 1fr; gap: var(--hn-space-2); }
.sg-checks li::before { content: ''; width: 1rem; height: 1rem; margin-top: 0.2rem; border-radius: var(--hn-radius-pill); background: var(--hn-color-tan) center / 0.625rem no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 5.2 4 7.5l4.5-5' fill='none' stroke='%232a1f3d' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.sg-checks--warn li::before { background: var(--hn-color-mist) center / 0.625rem no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M5 2v3.6M5 7.6v.1' fill='none' stroke='%232a1f3d' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E"); }

.sg-actions { display: flex; flex-wrap: wrap; gap: var(--hn-space-2); }
.sg-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--hn-space-2);
  min-height: 2.5rem;
  padding: 0 var(--hn-space-4);
  border: 1px solid var(--hn-color-midnight);
  border-radius: var(--hn-radius-sm);
  background: transparent;
  font-size: 0.875rem;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--hn-duration-fast) var(--hn-ease), color var(--hn-duration-fast) var(--hn-ease);
}
.sg-btn:hover { background: var(--hn-color-midnight); color: var(--hn-color-white); }
.sg-btn--primary { background: var(--hn-action); border-color: var(--hn-action); color: var(--hn-color-white); }
.sg-btn--primary:hover { background: var(--hn-action-hover); border-color: var(--hn-action-hover); }

.sg-table-wrap { overflow-x: auto; background: var(--hn-surface-raised); border-radius: var(--hn-radius); }
.sg-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.sg-table th, .sg-table td { padding: var(--hn-space-3) var(--hn-space-4); text-align: left; vertical-align: top; border-bottom: 1px solid var(--hn-border); }
.sg-table th { font-weight: 500; font-size: 0.875rem; color: var(--hn-text-muted); white-space: nowrap; }
.sg-table tr:last-child td { border-bottom: 0; }
.sg-table code, .sg-code { font: 0.875em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }

.sg-cards { display: grid; gap: var(--hn-space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); }
.sg-card {
  display: grid;
  gap: var(--hn-space-3);
  align-content: start;
  padding: var(--hn-space-6);
  background: var(--hn-surface-raised);
  border-radius: var(--hn-radius);
  text-decoration: none;
  transition: transform var(--hn-duration) var(--hn-ease);
}
a.sg-card:hover { transform: translateY(-2px); }
.sg-card h3 { font: 400 1.375rem/1.3 var(--hn-font-heading); }
.sg-card p { color: var(--hn-text-muted); font-size: 0.9375rem; }

.sg-rules { display: grid; gap: var(--hn-space-4); grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.sg-rule { padding: var(--hn-space-6); border-radius: var(--hn-radius); background: var(--hn-surface-raised); }
.sg-rule h3 { font: 400 1.25rem/1.3 var(--hn-font-heading); margin-bottom: var(--hn-space-3); }
.sg-rule ul { padding-left: 1.1rem; display: grid; gap: var(--hn-space-2); font-size: 0.9375rem; }
.sg-rule--dont { background: var(--hn-surface-muted); }

/* Template anatomy: a creative with labelled zones beside a legend */
.sg-anatomy { display: grid; gap: var(--hn-space-6); align-items: start; }
@media (min-width: 750px) { .sg-anatomy { grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); } }
.sg-legend { display: grid; gap: var(--hn-space-3); counter-reset: zone; padding: 0; list-style: none; }
.sg-legend li { display: grid; grid-template-columns: 1.75rem 1fr; gap: var(--hn-space-3); font-size: 0.9375rem; }
.sg-legend li::before {
  counter-increment: zone;
  content: counter(zone);
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--hn-radius-pill);
  background: var(--hn-color-midnight);
  color: var(--hn-color-white);
  font-size: 0.75rem;
}
.sg-legend strong { font-weight: 500; }

.sg-footer { margin-top: var(--hn-space-16); padding: var(--hn-space-8) var(--hn-gutter); border-top: 1px solid var(--hn-border); font-size: 0.875rem; color: var(--hn-text-muted); text-align: center; }

/* ── Creatives ─────────────────────────────────────────────────────────── */
/* --u = one design pixel of the canvas. Feed/square/story canvases are 1080 wide,
   link and landscape canvases 1200 wide. */
.art {
  position: relative;
  container-type: inline-size;
  width: 100%;
  overflow: hidden;
  background: var(--hn-color-snow);
  color: var(--hn-color-midnight);
  font-family: var(--hn-font-body);
  --u: calc(100cqw / 1080);
}
.art--feed { aspect-ratio: 4 / 5; }
.art--square { aspect-ratio: 1; }
.art--story { aspect-ratio: 9 / 16; }
.art--link { aspect-ratio: 1200 / 630; }
.art--landscape { aspect-ratio: 1200 / 628; }
.art--portrait-ads { aspect-ratio: 4 / 5; }
/* Children read --u relative to the .art container */
.art > * { --u: calc(100cqw / 1080); }
.art--link > *, .art--landscape > * { --u: calc(100cqw / 1200); }

[data-hn-mark] { display: block; }
/* Mark fills, as in assets/hn-base.css */
.hn-logo__primary { fill: var(--hn-logo-primary, var(--hn-color-lilac)); }
.hn-logo__accent { fill: var(--hn-logo-accent, var(--hn-color-tan)); }
.hn-logo--stamp { --hn-logo-primary: color-mix(in srgb, var(--hn-color-lilac) 70%, white); }
[data-hn-mark] svg { width: 100%; height: auto; }

.art__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.art__packshot { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }

.art__headline {
  font: 400 calc(var(--u) * 76)/1.12 var(--hn-font-heading);
  letter-spacing: -0.005em;
  text-wrap: balance;
}
.art__headline--lg { font-size: calc(var(--u) * 96); }
.art__headline--sm { font-size: calc(var(--u) * 60); }
.art__line { font-size: calc(var(--u) * 34); line-height: 1.35; }
.art__meta { font-size: calc(var(--u) * 30); font-weight: 500; }
.art__price { font-size: calc(var(--u) * 40); font-weight: 500; }
.art__url { font-size: calc(var(--u) * 28); letter-spacing: 0.02em; }
.art__brand { font-size: calc(var(--u) * 28); font-weight: 500; }

.art__stamp { width: calc(var(--u) * 132); flex: none; }
.art__logo { width: calc(var(--u) * 240); flex: none; }
.art__sparkle { position: absolute; width: calc(var(--u) * 84); color: var(--hn-color-tan); }

/* Pill label on photos (solid, never translucent: no glassmorphism) */
.art__chip {
  display: inline-flex;
  align-items: center;
  padding: calc(var(--u) * 12) calc(var(--u) * 26);
  border-radius: 999px;
  background: var(--hn-color-white);
  font-size: calc(var(--u) * 28);
  font-weight: 500;
}
.art__btn {
  display: inline-flex;
  align-items: center;
  padding: calc(var(--u) * 20) calc(var(--u) * 40);
  border-radius: calc(var(--u) * 8);
  background: var(--hn-color-plum);
  color: var(--hn-color-white);
  font-size: calc(var(--u) * 32);
  font-weight: 500;
}
.art__btn--white { background: var(--hn-color-white); color: var(--hn-color-midnight); }

/* Theme panels behind text */
.art .is-snow { background: var(--hn-color-snow); color: var(--hn-color-midnight); }
.art .is-white { background: var(--hn-color-white); color: var(--hn-color-midnight); }
.art .is-lilac { background: var(--hn-color-lilac); color: var(--hn-color-white); --hn-logo-primary: var(--hn-color-white); --hn-logo-accent: var(--hn-color-tan); }
.art .is-plum { background: var(--hn-color-plum); color: var(--hn-color-white); --hn-logo-primary: var(--hn-color-white); --hn-logo-accent: var(--hn-color-tan); }
.art .is-mist { background: var(--hn-color-mist); color: var(--hn-color-midnight); }
.art { --hn-logo-primary: var(--hn-color-lilac); --hn-logo-accent: var(--hn-color-tan); }

/* T1 Split: photo on top, text panel below */
.art--split { display: grid; grid-template-rows: 1fr auto; }
.art--split .art__media { position: relative; overflow: hidden; }
.art--split .art__panel {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: calc(var(--u) * 40);
  padding: calc(var(--u) * 64) calc(var(--u) * 72) calc(var(--u) * 72);
}
.art--split .art__copy { display: grid; gap: calc(var(--u) * 18); }

/* T2 Inset card: full-bleed photo, solid card at the bottom left */
.art--inset .art__card {
  position: absolute;
  left: calc(var(--u) * 56);
  right: calc(var(--u) * 56);
  bottom: calc(var(--u) * 56);
  display: grid;
  gap: calc(var(--u) * 18);
  padding: calc(var(--u) * 52) calc(var(--u) * 56);
  border-radius: calc(var(--u) * 8);
}
.art--inset .art__card--narrow { right: auto; max-width: calc(var(--u) * 760); }
.art--inset .art__corner { position: absolute; top: calc(var(--u) * 48); right: calc(var(--u) * 48); }

/* T3 Packshot: product on white, name and price */
.art--product { display: grid; grid-template-rows: auto 1fr auto; background: var(--hn-color-white); }
.art--product .art__top { display: flex; justify-content: space-between; align-items: center; padding: calc(var(--u) * 56) calc(var(--u) * 64) 0; }
.art--product .art__shot { min-height: 0; padding: calc(var(--u) * 24) calc(var(--u) * 120); }
.art--product .art__foot {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: calc(var(--u) * 32);
  padding: calc(var(--u) * 48) calc(var(--u) * 64) calc(var(--u) * 64);
  border-top: calc(var(--u) * 2) solid var(--hn-color-line);
  margin: 0 calc(var(--u) * 64);
  padding-left: 0;
  padding-right: 0;
}
.art--product .art__name { font: 400 calc(var(--u) * 52)/1.15 var(--hn-font-heading); }

/* T4 Brand band: solid lilac or plum with one large headline */
/* No padding on .art itself: container units measure its content box, so the inset lives
   on the children instead. */
.art--band { display: grid; grid-template-rows: auto 1fr auto; }
.art--band > * { margin-inline: calc(var(--u) * 80); }
.art--band > .art__logo { margin-top: calc(var(--u) * 80); }
.art--band > .art__bottom { margin-bottom: calc(var(--u) * 80); }
.art--band .art__mid { display: grid; align-content: center; gap: calc(var(--u) * 32); }
.art--band .art__bottom { display: flex; justify-content: space-between; align-items: end; gap: calc(var(--u) * 40); }

/* T5 Side: photo left, panel right (link previews and landscape ads) */
.art--side { display: grid; grid-template-columns: 1fr 1fr; }
.art--side .art__media { position: relative; }
.art--side .art__panel { position: relative; display: grid; align-content: space-between; padding: calc(var(--u) * 64); }
.art--side .art__copy { display: grid; gap: calc(var(--u) * 20); }

/* Stories are read full-screen: the supporting line goes up to 44px */
.art--story .art__line { font-size: calc(var(--u) * 44); }

/* Story safe area: Instagram covers the top 250 and bottom 250 design pixels */
.art--story .art__safe { position: absolute; inset: calc(var(--u) * 250) 0; }
.art__guides .art--story::after {
  content: '';
  position: absolute;
  inset: calc(100cqw / 1080 * 250) 0;
  border-block: 2px dashed rgb(209 11 11 / 0.7);
  pointer-events: none;
}

/* Zone markers for template anatomy */
.art__zone {
  position: absolute;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--hn-color-midnight);
  color: var(--hn-color-white);
  font: 500 0.75rem/1 var(--hn-font-body);
  box-shadow: 0 0 0 2px var(--hn-color-white);
}
.art__placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--hn-color-mist) repeating-linear-gradient(45deg, transparent 0 calc(var(--u) * 24), rgb(139 111 135 / 0.08) calc(var(--u) * 24) calc(var(--u) * 48));
  color: var(--hn-color-plum);
  font-size: calc(var(--u) * 32);
  text-align: center;
}

/* ── Platform mockups ──────────────────────────────────────────────────── */
.mock {
  width: 100%;
  max-width: 30rem;
  background: #fff;
  color: var(--mock-text);
  font: 400 0.9375rem/1.35 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  border: 1px solid var(--mock-line);
  border-radius: var(--hn-radius);
  overflow: hidden;
}
.mock__head { display: flex; align-items: center; gap: 0.5rem; padding: 0.75rem; }
.mock__avatar { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; overflow: hidden; }
.mock__avatar img { width: 100%; height: 100%; }
.mock__who { display: grid; line-height: 1.25; min-width: 0; }
.mock__name { font-weight: 600; }
.mock__sub { font-size: 0.8125rem; color: var(--mock-muted); }
.mock__dots { margin-left: auto; color: var(--mock-muted); letter-spacing: 1px; font-weight: 700; }
.mock__text { padding: 0 0.75rem 0.75rem; white-space: pre-line; overflow-wrap: anywhere; }
.mock__text .more { color: var(--mock-muted); }
.mock__icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* Facebook */
.mock-fb .mock__avatar { width: 2.5rem; height: 2.5rem; }
.mock-fb__link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  background: var(--mock-fill);
}
.mock-fb__linktext { min-width: 0; flex: 1; display: grid; line-height: 1.3; }
.mock-fb__domain { font-size: 0.75rem; color: var(--mock-muted); text-transform: uppercase; }
.mock-fb__headline { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-fb__desc { font-size: 0.875rem; color: var(--mock-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mock-fb__cta { flex: none; padding: 0.5rem 0.75rem; border-radius: 6px; background: #e4e6eb; font-weight: 600; font-size: 0.875rem; }
.mock-fb__bar { display: flex; justify-content: space-around; padding: 0.375rem 0.75rem; border-top: 1px solid var(--mock-line); margin: 0 0.75rem; color: var(--mock-muted); font-weight: 600; font-size: 0.875rem; }
.mock-fb__bar span { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.375rem; }

/* Carousels (Facebook and Instagram ads, organic Instagram carousels) */
.mock-carousel { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0 0.75rem 0.75rem; scroll-snap-type: x mandatory; }
.mock-carousel__card { flex: 0 0 78%; scroll-snap-align: start; border: 1px solid var(--mock-line); border-radius: 8px; overflow: hidden; }
.mock-carousel__card .mock-fb__link { background: #fff; }
.mock-ig .mock-carousel { padding: 0; gap: 0; }
.mock-ig .mock-carousel__card { flex-basis: 100%; border: 0; border-radius: 0; }

/* Instagram */
.mock-ig .mock__avatar { width: 2rem; height: 2rem; box-shadow: 0 0 0 1.5px #fff, 0 0 0 3px var(--mock-line); }
.mock-ig .mock__head { padding: 0.625rem 0.75rem; }
.mock-ig .mock__name { font-size: 0.875rem; }
.mock-ig__cta { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem; font-weight: 600; font-size: 0.875rem; border-bottom: 1px solid var(--mock-line); }
.mock-ig__cta--brand { background: var(--hn-color-plum); color: #fff; border: 0; }
.mock-ig__actions { display: flex; gap: 0.875rem; padding: 0.625rem 0.75rem 0.25rem; }
.mock-ig__actions .mock__icon { width: 1.5rem; height: 1.5rem; }
.mock-ig__actions .mock__icon:last-child { margin-left: auto; }
.mock-ig__dots { display: flex; justify-content: center; gap: 4px; margin-top: -1.4rem; position: relative; padding-bottom: 0.5rem; }
.mock-ig__dots i { width: 6px; height: 6px; border-radius: 50%; background: #c7c7c7; }
.mock-ig__dots i:first-child { background: #0095f6; }
.mock-ig__caption { padding: 0.25rem 0.75rem 0.875rem; font-size: 0.875rem; white-space: pre-line; overflow-wrap: anywhere; }
.mock-ig__caption b { font-weight: 600; }
.mock-ig__caption .tag { color: #00376b; }

/* Phone frame for stories and reels */
.mock-phone {
  position: relative;
  width: min(100%, 20rem);
  border-radius: 1.75rem;
  padding: 0.5rem;
  background: #111;
}
.mock-phone__screen { position: relative; border-radius: 1.3rem; overflow: hidden; }
.mock-phone__top {
  position: absolute;
  inset: 0.625rem 0.625rem auto;
  z-index: 2;
  display: grid;
  gap: 0.5rem;
  color: #fff;
  font: 600 0.8125rem/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.mock-phone__bars { display: flex; gap: 3px; }
.mock-phone__bars i { flex: 1; height: 2px; border-radius: 2px; background: rgb(255 255 255 / 0.45); }
.mock-phone__bars i:first-child { background: #fff; }
.mock-phone__who { display: flex; align-items: center; gap: 0.5rem; text-shadow: 0 1px 2px rgb(0 0 0 / 0.35); }
.mock-phone__who img { width: 1.75rem; height: 1.75rem; border-radius: 50%; }
.mock-phone__who span { font-weight: 400; opacity: 0.85; }
.mock-phone__bottom {
  position: absolute;
  inset: auto 0.75rem 0.875rem;
  z-index: 2;
  display: grid;
  justify-items: center;
  gap: 0.375rem;
  color: #fff;
  font: 600 0.8125rem/1.2 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.mock-phone__link { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.5rem 0.875rem; border-radius: 999px; background: #fff; color: #111; }
.mock-phone__link--sticker { color: #00376b; }

/* Google search */
.mock-serp { max-width: 40rem; padding: 1rem 1.25rem; font-family: Arial, Helvetica, sans-serif; color: #202124; }
.mock-serp__query { display: flex; align-items: center; gap: 0.75rem; padding: 0.625rem 1rem; margin-bottom: 1rem; border: 1px solid var(--mock-line); border-radius: 999px; font-size: 0.9375rem; }
.mock-serp__sponsored { font-weight: 700; font-size: 0.875rem; margin-bottom: 0.5rem; }
.mock-serp__site { display: flex; align-items: center; gap: 0.75rem; }
.mock-serp__fav { width: 1.75rem; height: 1.75rem; border-radius: 50%; border: 1px solid var(--mock-line); overflow: hidden; display: grid; place-items: center; }
.mock-serp__fav img { width: 1.125rem; height: 1.125rem; border-radius: 4px; }
.mock-serp__site b { display: block; font-weight: 400; font-size: 0.875rem; }
.mock-serp__site span { display: block; font-size: 0.75rem; color: var(--mock-url); }
.mock-serp__title { margin: 0.375rem 0 0.25rem; color: var(--mock-link); font-size: 1.25rem; line-height: 1.3; }
.mock-serp__desc { font-size: 0.875rem; line-height: 1.58; color: #474747; }
.mock-serp__callouts { font-size: 0.875rem; color: #474747; margin-top: 0.125rem; }
.mock-serp__sitelinks { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem 1.5rem; margin-top: 0.75rem; }
.mock-serp__sitelinks a { color: var(--mock-link); text-decoration: none; font-size: 0.9375rem; }
.mock-serp__sitelinks small { display: block; color: #474747; font-size: 0.8125rem; }
.mock-serp__sitelinks--pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.mock-serp__sitelinks--pills a { padding: 0.375rem 0.875rem; border: 1px solid var(--mock-line); border-radius: 999px; }

/* Google Shopping product tiles */
.mock-shop { display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: 0.75rem; font-family: Arial, Helvetica, sans-serif; }
.mock-shop__tile { display: grid; gap: 0.25rem; padding: 0.625rem; border: 1px solid var(--mock-line); border-radius: 8px; background: #fff; color: #202124; font-size: 0.8125rem; }
.mock-shop__tile img { aspect-ratio: 1; object-fit: contain; width: 100%; border-radius: 4px; mix-blend-mode: multiply; }
.mock-shop__tile b { font-size: 0.9375rem; }
.mock-shop__tile .t { color: var(--mock-link); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mock-shop__tile span { color: var(--mock-url); }

/* ── Google Display banners (assets/banners.js) ────────────────────────── */
/* Fixed pixel sizes, not container units: each banner is drawn at its real size. */
.bn-board { display: flex; flex-wrap: wrap; align-items: flex-start; gap: var(--hn-space-6); overflow-x: auto; padding-bottom: var(--hn-space-2); }
.bn-item { display: grid; gap: var(--hn-space-2); }
.bn-item figcaption { display: flex; align-items: center; justify-content: space-between; gap: var(--hn-space-3); font-size: 0.8125rem; color: var(--hn-text-muted); font-variant-numeric: tabular-nums; }
.bn-item .sg-btn { min-height: 1.75rem; padding: 0 var(--hn-space-3); font-size: 0.75rem; }

.bn {
  position: relative;
  flex: none;
  overflow: hidden;
  /* Google wants light ads set off from the page: a visible border, inside the size */
  border: 1px solid var(--hn-color-lilac);
  background: var(--hn-color-snow);
  color: var(--hn-color-midnight);
  font-family: var(--hn-font-body);
  --hn-logo-primary: var(--hn-color-lilac);
  --hn-logo-accent: var(--hn-color-tan);
}
.bn__media { position: relative; overflow: hidden; }
.bn__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bn__hl { font: 400 var(--hl)/1.15 var(--hn-font-heading); text-wrap: balance; }
.bn__line { margin-top: 0.3em; font-size: var(--line); line-height: 1.3; color: var(--hn-color-plum); }
.bn__cta {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  flex: none;
  padding: 0.55em 1em;
  border-radius: var(--hn-radius-sm);
  background: var(--hn-color-plum);
  color: var(--hn-color-white);
  font-size: var(--cta);
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
}
.bn__logo { width: var(--logo); flex: none; }
.bn__icon { flex: none; aspect-ratio: 1; }
.bn--strip .bn__icon { align-self: stretch; height: auto; margin: var(--pad) 0 var(--pad) var(--pad); }
.bn__icon--box { width: var(--logo); height: var(--logo); }

.bn--box { display: grid; grid-template-rows: var(--media) 1fr; }
.bn--box .bn__panel { display: grid; align-content: space-between; padding: var(--pad); min-height: 0; }
.bn--box .bn__row { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }

.bn--tower { display: grid; grid-template-rows: var(--media) 1fr; }
.bn--tower .bn__panel { display: grid; grid-template-rows: auto 1fr auto; gap: calc(var(--pad) * 0.8); padding: var(--pad); justify-items: start; }
.bn--tower .bn__copy { align-self: center; }

.bn--strip { display: flex; align-items: center; gap: var(--pad); padding-right: var(--pad); }
.bn--strip .bn__media { align-self: stretch; width: var(--media); flex: none; }
.bn--strip .bn__copy { flex: 1; min-width: 0; }

.bn--billboard { display: grid; grid-template-columns: var(--media) 1fr; }
.bn--billboard .bn__panel { display: grid; grid-template-rows: auto 1fr auto; gap: 12px; padding: 24px var(--pad); justify-items: start; }
.bn--billboard .bn__copy { align-self: center; }

.bn--compact { display: grid; grid-template-columns: var(--media) 1fr; }
.bn--compact .bn__panel { display: grid; align-content: center; justify-items: start; gap: 8px; padding: 0 var(--pad); }

/* Native preview of a responsive display ad (Google assembles these) */
.mock-native { max-width: 22rem; display: grid; border: 1px solid var(--mock-line); border-radius: 8px; overflow: hidden; background: #fff; color: #202124; font-family: Arial, Helvetica, sans-serif; }
.mock-native__body { display: grid; gap: 0.375rem; padding: 0.875rem; }
.mock-native__head { display: flex; align-items: center; gap: 0.5rem; font-size: 0.75rem; color: var(--mock-url); }
.mock-native__head img { width: 1.25rem; height: 1.25rem; border-radius: 4px; }
.mock-native__title { font-size: 1.0625rem; font-weight: 700; line-height: 1.3; }
.mock-native__desc { font-size: 0.875rem; color: #474747; }
.mock-native__btn { justify-self: end; margin-top: 0.25rem; padding: 0.5rem 1rem; border-radius: 999px; background: var(--hn-color-plum); color: #fff; font-size: 0.875rem; font-weight: 700; }
.mock-native--side { max-width: 36rem; grid-template-columns: 40% 1fr; }
.mock-native--side .art { height: 100%; aspect-ratio: auto; }

/* ── Editor (assets/editor.js) ─────────────────────────────────────────── */
[data-ed-key][contenteditable] { cursor: text; }
[data-ed-key][contenteditable]:hover { outline: 1px dashed var(--hn-color-lilac); outline-offset: 2px; }
[data-ed-key][contenteditable]:focus { outline: 2px solid var(--hn-color-lilac); outline-offset: 2px; }
[data-ed-image] { cursor: pointer; }
[data-ed-image]:hover { filter: brightness(0.94); }

.ed-bar {
  position: fixed;
  right: var(--hn-space-4);
  bottom: var(--hn-space-4);
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--hn-space-3);
  padding: var(--hn-space-2) var(--hn-space-2) var(--hn-space-2) var(--hn-space-4);
  background: var(--hn-color-white);
  border-radius: var(--hn-radius);
  box-shadow: var(--hn-shadow-float);
  font-size: 0.875rem;
}
.ed-bar .sg-btn { min-height: 2rem; }

/* Style only the open dialog: a closed <dialog> must never get a display value */
.ed-dialog[open] { display: grid; grid-template-rows: auto auto 1fr; gap: var(--hn-space-4); }
.ed-dialog {
  width: min(40rem, calc(100vw - 2rem));
  height: min(42rem, calc(100vh - 2rem));
  padding: var(--hn-space-6);
  border: 0;
  border-radius: var(--hn-radius);
  background: var(--hn-color-snow);
  color: var(--hn-color-midnight);
  box-shadow: var(--hn-shadow-float);
}
.ed-dialog::backdrop { background: rgb(var(--hn-color-midnight-rgb) / 0.4); }
.ed-dialog__head { display: flex; justify-content: space-between; align-items: center; }
.ed-dialog__head h2 { font: 400 1.5rem/1.3 var(--hn-font-heading); }
.ed-tabs { display: flex; gap: var(--hn-space-1); border-bottom: 1px solid var(--hn-border); }
.ed-tabs button { padding: var(--hn-space-2) var(--hn-space-3); border: 0; border-bottom: 2px solid transparent; background: none; cursor: pointer; }
.ed-tabs button[aria-selected='true'] { border-bottom-color: var(--hn-color-midnight); font-weight: 500; }
.ed-panel { display: grid; gap: var(--hn-space-3); align-content: start; min-height: 0; overflow-y: auto; }
.ed-panel[hidden] { display: none; }
.ed-input { width: 100%; min-height: 2.75rem; padding: 0 var(--hn-space-4); border: 1px solid var(--hn-border); border-radius: var(--hn-radius-sm); background: var(--hn-color-white); font: inherit; color: inherit; }
.ed-check { display: flex; gap: var(--hn-space-2); align-items: center; font-size: 0.9375rem; }
.ed-check[hidden] { display: none; }
.ed-note { color: var(--hn-text-muted); font-size: 0.9375rem; }
.ed-products { display: grid; gap: var(--hn-space-2); }
.ed-product { background: var(--hn-color-white); border-radius: var(--hn-radius); }
.ed-product__row { display: flex; align-items: center; gap: var(--hn-space-3); width: 100%; padding: var(--hn-space-2); border: 0; background: none; text-align: left; cursor: pointer; }
.ed-product__row img { width: 3rem; height: 3rem; object-fit: contain; border-radius: var(--hn-radius-sm); }
.ed-product__row span { display: grid; }
.ed-product__row strong { font-weight: 500; }
.ed-product__row small { color: var(--hn-text-muted); font-size: 0.8125rem; }
.ed-product__images { display: grid; grid-template-columns: repeat(auto-fill, minmax(6rem, 1fr)); gap: var(--hn-space-2); padding: 0 var(--hn-space-2) var(--hn-space-2); }
.ed-product__images button { padding: 0; border: 1px solid var(--hn-border); border-radius: var(--hn-radius-sm); background: var(--hn-color-white); overflow: hidden; cursor: pointer; }
.ed-product__images button:hover { border-color: var(--hn-color-midnight); }
.ed-product__images img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.ed-drop { display: grid; gap: var(--hn-space-2); justify-items: center; padding: var(--hn-space-12) var(--hn-space-6); border: 1px dashed var(--hn-color-lilac); border-radius: var(--hn-radius); background: var(--hn-color-white); text-align: center; cursor: pointer; }
.ed-drop span { color: var(--hn-text-muted); font-size: 0.9375rem; max-width: 24rem; }
.ed-range { display: grid; gap: var(--hn-space-1); font-size: 0.9375rem; }
.ed-range input { width: 100%; accent-color: var(--hn-color-plum); }
