/* The fictional agents' Facebook post previews (tools/posts.py). Linked on /maaklerile/ and the front page via
   META["css"]. The page around them is website mode; the graphics are client post mode: each agent keeps their
   own brand colours and headline font. */

/* Post fonts, self hosted from @fontsource (SIL OFL 1.1, licenses copied next to them by tools/build.py).
   Used only inside the post graphics; the browser fetches a face only when a graphic on the page uses it. */
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/schibsted-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Schibsted Grotesk"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/schibsted-grotesk-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F; }
@font-face { font-family: "Bitter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/bitter-latin-700-normal.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: "Bitter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/bitter-latin-ext-700-normal.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; }

/* ---------- Facebook post preview ---------- */
.fbp {
  background: #fff; color: #050505;
  border-radius: var(--radius);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.fbp-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; }
.fbp-mono {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--a-bg); color: var(--a-accent);
  font: 700 14px/1 "Schibsted Grotesk", var(--font); letter-spacing: 0.04em;
}
.fbp-who { min-width: 0; line-height: 1.25; }
.fbp-page { font-size: 15px; font-weight: 600; }
.fbp-when { display: flex; align-items: center; gap: 4px; font-size: 13px; color: #65676b; }
.fbp-globe { flex: 0 0 auto; }
.fbp-caption { margin: 0 16px 12px; font-size: 15px; line-height: 1.45; white-space: pre-line; }
/* "Kuva rohkem" on a phone, like Facebook: the caption stops after five lines and the native <details> right under it
   opens the rest (no JS; :has() reads its open state). The full text is always in the DOM. Desktop shows it all. */
.fbp-more { display: none; }
@media (max-width: 767px) {
  .fbp-caption:has(+ .fbp-more) {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden;
    margin-bottom: 0;
  }
  .fbp-caption:has(+ .fbp-more[open]) { display: block; -webkit-line-clamp: unset; line-clamp: none; margin-bottom: 12px; }
  .fbp-more { display: block; margin: 0 16px 4px; }
  .fbp-more[open] { display: none; }
  .fbp-more summary {
    display: inline-flex; align-items: center; min-height: 44px;
    font-size: 15px; font-weight: 600; color: #65676b; cursor: pointer; list-style: none;
    -webkit-tap-highlight-color: transparent;
  }
  .fbp-more summary::-webkit-details-marker { display: none; }
  .fbp-more summary:focus { outline: none; }
  .fbp-more summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
}

/* Front page hero: head and graphic only */
.fbp-short .fbp-head { padding-bottom: 10px; }
.fbp-actions {
  display: flex; justify-content: space-around; margin: 0 12px; padding: 8px 0;
  border-top: 1px solid #e4e6eb; color: #65676b; font-size: 14px; font-weight: 600;
}
.fbp-actions span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- The 4:5 post graphic (client post mode) ----------
   1em = 1% of the graphic's width (container query unit), so the graphic scales as one picture. */
.fbp-art { container-type: inline-size; }
.agent-kaisa { --a-bg: #2F5D50; --a-fg: #F4F1E4; --a-accent: #F4F1E4; --a-accent-fg: #2F5D50; --a-font: "Schibsted Grotesk", sans-serif; --a-weight: 800; }
.agent-mihkel { --a-bg: #1C1C1C; --a-fg: #F4EEE2; --a-accent: #CBBF9F; --a-accent-fg: #1C1C1C; --a-font: "Marcellus", Georgia, serif; --a-weight: 400; }
.agent-liis { --a-bg: #8A3B1F; --a-fg: #FBEFE6; --a-accent: #FBEFE6; --a-accent-fg: #8A3B1F; --a-font: "Bitter", Georgia, serif; --a-weight: 700; }

.g {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  font-size: 1cqw; line-height: 1.2;
  background: var(--a-bg); color: var(--a-fg);
  font-family: "Schibsted Grotesk", var(--font);
}
.g-title { font-family: var(--a-font); font-weight: var(--a-weight); font-size: 6.4em; line-height: 1.1; letter-spacing: -0.01em; text-wrap: balance; }
.g-photo { position: absolute; left: 0; top: 0; width: 100%; object-fit: cover; background: rgba(0, 0, 0, 0.18); }
.g-band { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; padding: 6em 7em 5.5em; }

/* Listing: photo top, colour band with label, title, details, price */
.g-listing .g-photo { height: 55%; }
.g-listing .g-band { top: 55%; justify-content: space-between; }
.g-label {
  display: inline-block; padding: 0.4em 0.8em; border-radius: 0.15em;
  background: var(--a-accent); color: var(--a-accent-fg);
  font-size: 3em; font-weight: 800; letter-spacing: 0.12em; line-height: 1.1;
}
.g-listing .g-title { margin-top: 0.4em; }
.g-details { margin-top: 0.5em; font-size: 3.3em; font-weight: 500; opacity: 0.85; white-space: pre; }
.g-foot { display: flex; align-items: center; justify-content: space-between; gap: 3em; }
.g-price { padding: 0.2em 0.5em; border-radius: 0.1em; background: var(--a-fg); color: var(--a-bg); font-size: 5em; font-weight: 800; white-space: nowrap; }
.g-brand { font-size: 2.8em; letter-spacing: 0.14em; opacity: 0.8; white-space: nowrap; }

/* Tip: photo, title, numbered list, signature */
.g-tip .g-photo { height: 46%; }
.g-tip .g-band { top: 46%; padding-bottom: 5em; }
.g-list { list-style: none; padding: 0; margin-top: 4.5em; display: flex; flex-direction: column; gap: 2.4em; }
.g-list li { display: flex; align-items: center; gap: 0.6em; font-size: 4em; font-weight: 700; line-height: 1.2; }
.g-num {
  flex: 0 0 auto; width: 1.4em; height: 1.4em; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 0.06em solid currentColor; font-size: 0.7em; font-weight: 800;
}
.g-sign {
  margin-top: auto; padding-top: 2.5em; border-top: 1px solid currentColor;
  display: flex; justify-content: space-between; align-items: baseline; gap: 3em;
}
.g-sign-name { font-family: var(--a-font); font-weight: var(--a-weight); font-size: 3.4em; }
.g-sign-role { font-size: 2.8em; opacity: 0.8; }

/* Info: label, big title, rows, total line */
.g-info { display: flex; flex-direction: column; padding: 8em 7.5em 6.5em; }
.g-kicker { font-size: 3.4em; font-weight: 700; opacity: 0.75; }
.g-info .g-title { margin-top: 0.6em; font-size: 7.6em; white-space: pre-line; }
.g-rows { margin-top: auto; }
.g-row { display: flex; justify-content: space-between; align-items: baseline; gap: 4em; padding: 3em 0; border-top: 1px solid currentColor; }
.g-row > span:first-child { font-size: 3.6em; opacity: 0.85; line-height: 1.3; }
.g-row-v { font-size: 5.4em; font-weight: 700; white-space: nowrap; }
.g-row.g-total { padding-bottom: 0; border-top-width: 0.5em; }
.g-total > span:first-child { font-size: 3.8em; font-weight: 700; opacity: 1; }
.g-total .g-row-v { font-size: 7.6em; font-weight: 800; }
.g-info .g-sign { margin-top: 6em; padding-top: 0; border-top: 0; }

/* 9:16 short video frame of a listing: the same design, taller photo, a play mark top right */
.g-reel { aspect-ratio: 9 / 16; }
.g-reel.g-listing .g-photo { height: 50%; }
.g-reel.g-listing .g-band { top: 50%; padding: 9em 8em 11em; }
.g-reel .g-title { font-size: 8.4em; }
.g-reel .g-label { font-size: 3.8em; }
.g-reel .g-details { font-size: 4.2em; white-space: normal; }
.g-reel .g-price { font-size: 6.6em; }
.g-reel .g-brand { font-size: 3.4em; }
.g-reel .g-foot { flex-wrap: wrap; row-gap: 3em; }
.g-play { position: absolute; top: 7em; right: 7em; width: 14em; height: 14em; }
.g-play-bg { fill: var(--a-accent); }
.g-play-mark { fill: var(--a-accent-fg); }

/* ---------- 2026-11-11 showcase: premium frames across fields ---------- */

/* Brand colour sets for the fictional businesses of content/showcase.json (client post mode). */
.brand-juur { --a-bg: #1B140E; --a-fg: #F3EAD9; --a-accent: #D9A441; --a-accent-fg: #1B140E; --a-font: "Bitter", Georgia, serif; --a-weight: 700; }
.brand-kivisilla { --a-bg: #16324F; --a-fg: #EAF0F6; --a-accent: #EAF0F6; --a-accent-fg: #16324F; --a-font: "Schibsted Grotesk", sans-serif; --a-weight: 800; }
.brand-nora { --a-bg: #141414; --a-fg: #EFEDE8; --a-accent: #C9A96A; --a-accent-fg: #141414; --a-font: "Marcellus", Georgia, serif; --a-weight: 400; }
.brand-vahtramae { --a-bg: #101418; --a-fg: #F2F4F6; --a-accent: #E8B33C; --a-accent-fg: #101418; --a-font: "Schibsted Grotesk", sans-serif; --a-weight: 800; }

/* Any bare graphic gets a size container from its wrapper. */
.art { container-type: inline-size; }

/* Lux graphic: full bleed photo, legibility scrim, brand line, big title. 1em = 1cqw. */
.lux {
  position: relative; aspect-ratio: 4 / 5; overflow: hidden;
  background: var(--a-bg); color: #fff;
  font-size: 1cqw; line-height: 1.2;
  font-family: "Schibsted Grotesk", var(--font);
}
.lux-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.lux-scrim { position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78) 0%, rgba(0, 0, 0, 0.30) 40%, rgba(0, 0, 0, 0) 64%); }
.lux-band { position: absolute; left: 0; right: 0; bottom: 0; padding: 6.5em 7em; display: flex; flex-direction: column; }
.lux-label { font-size: 2.7em; font-weight: 700; letter-spacing: 0.22em; color: var(--a-accent); margin-bottom: 1.1em; }
.lux-title { font-family: var(--a-font); font-weight: var(--a-weight); font-size: 7.4em; line-height: 1.06; letter-spacing: -0.01em; text-wrap: balance; }
.lux-line { margin-top: 0.5em; font-size: 3.4em; line-height: 1.3; opacity: 0.92; }
.lux-brand { margin-top: 2.6em; font-size: 2.6em; letter-spacing: 0.2em; opacity: 0.85; white-space: nowrap; }
.lux-foot { display: flex; justify-content: space-between; align-items: baseline; gap: 3em; margin-top: 2.2em; }
.lux-foot .lux-brand { margin-top: 0; }
.lux-price { font-size: 6.2em; font-weight: 800; letter-spacing: -0.02em; white-space: nowrap; }

/* 9:16 short video frame */
.lux-reel { aspect-ratio: 9 / 16; }
.lux-reel .lux-title { font-size: 8.6em; }
.lux-reel .lux-line { font-size: 4em; }
.lux-play { position: absolute; top: 6em; right: 6em; width: 12em; height: 12em; }
.lux-play-bg { fill: rgba(255, 255, 255, 0.92); }
.lux-play-mark { fill: #111; }

/* Typographic car post (no photo rights, type carries it) */
.lux-auto { display: flex; flex-direction: column; padding: 8em 7em; }
.lux-auto .lux-label { margin-bottom: 0; }
.auto-model { margin-top: 1.6em; font-family: var(--a-font); font-weight: 800; font-size: 8em; line-height: 1.05; letter-spacing: -0.015em; text-wrap: balance; }
.auto-year { color: var(--a-accent); }
.auto-specs { margin-top: 1.4em; font-size: 3.6em; opacity: 0.85; }
.auto-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline; gap: 3em;
  border-top: 1px solid rgba(255, 255, 255, 0.25); padding-top: 3em; }
.auto-price { font-size: 7em; font-weight: 800; color: var(--a-accent); white-space: nowrap; }

/* Instagram post chrome */
.igp {
  background: #fff; color: #111;
  border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.05);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
.igp-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; }
.igp-avatar {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--a-bg); color: var(--a-accent);
  font: 700 12px/1 "Schibsted Grotesk", var(--font); letter-spacing: 0.04em;
}
.igp-who { min-width: 0; line-height: 1.25; }
.igp-handle { font-size: 14px; font-weight: 600; }
.igp-note { font-size: 12px; color: #737373; }
.igp-dots { margin-left: auto; font-weight: 700; letter-spacing: 0.08em; color: #111; }
.igp-art { container-type: inline-size; }
.igp-actions { display: flex; align-items: center; padding: 10px 14px 0; color: #111; }
.igp-actions svg { width: 23px; height: 23px; }
.igp-left { display: flex; gap: 14px; flex: 1; }
.igp-caption { padding: 9px 14px 14px; font-size: 14px; line-height: 1.4; }
.igp-caption strong { font-weight: 600; }

/* Bare 9:16 video card */
.reel-card { container-type: inline-size; border-radius: var(--radius); overflow: hidden;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.05); }

/* TikTok style playing short video sample (CSS motion stands in for the clip). */
.tok { border-radius: var(--radius); overflow: hidden; background: #000;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.05); }
.tok-in { position: relative; aspect-ratio: 9 / 16; overflow: hidden; color: #fff;
  font-size: 1cqw; line-height: 1.25; font-family: "Schibsted Grotesk", var(--font); }
.tok-scene { position: absolute; inset: 0; opacity: 0;
  animation: tok-cut 12s linear infinite; }
.tok-s2 { animation-delay: 4s; }
.tok-s3 { animation-delay: 8s; }
@keyframes tok-cut {
  0% { opacity: 0; }
  5% { opacity: 1; }
  33.3% { opacity: 1; }
  39% { opacity: 0; }
  100% { opacity: 0; }
}
.tok-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  animation: tok-zoom 12s linear infinite; animation-delay: inherit; }
@keyframes tok-zoom { 0% { transform: scale(1.02); } 39% { transform: scale(1.14); } 100% { transform: scale(1.14); } }
.tok-line { position: absolute; left: 6cqw; right: 6cqw; bottom: 34cqw;
  font-family: var(--a-font); font-weight: var(--a-weight); font-size: 8.4em; line-height: 1.08;
  letter-spacing: -0.01em; text-wrap: balance; text-shadow: 0 0.06em 0.5em rgba(0, 0, 0, 0.45); }
.tok-scrim { position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.18) 34%, rgba(0, 0, 0, 0) 55%),
              linear-gradient(to bottom, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 18%); }
.tok-note { position: absolute; top: 4em; left: 0; right: 0; text-align: center;
  font-size: 3em; font-weight: 500; opacity: 0.85; }
.tok-side { position: absolute; right: 4em; bottom: 24em; display: flex; flex-direction: column;
  gap: 6.5em; align-items: center; }
.tok-side svg { width: 8.5em; height: 8.5em; filter: drop-shadow(0 0.4em 1.2em rgba(0, 0, 0, 0.45)); }
.tok-meta { position: absolute; left: 5em; right: 18em; bottom: 9em; }
.tok-handle { font-size: 3.8em; font-weight: 700; }
.tok-caption { margin-top: 0.6em; font-size: 3.4em; opacity: 0.95; }
.tok-bar { position: absolute; left: 5em; right: 5em; bottom: 3em; height: 0.7em;
  border-radius: 999px; background: rgba(255, 255, 255, 0.25); overflow: hidden; }
.tok-bar::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0;
  background: #fff; border-radius: 999px; animation: tok-progress 12s linear infinite; }
@keyframes tok-progress { from { width: 0; } to { width: 100%; } }

/* First comment under a sample FB post: the link line with a compact link card. */
.fbc { display: flex; gap: 8px; margin: 8px 12px 12px; padding-top: 8px; border-top: 1px solid #e4e6eb;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif; color: #050505; }
.fbc-avatar { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--a-bg); color: var(--a-accent); font: 700 10px/1 "Schibsted Grotesk", var(--font); }
.fbc-body { min-width: 0; flex: 1; }
.fbc-bubble { display: inline-block; max-width: 100%; background: #f0f2f5; border-radius: 16px;
  padding: 7px 12px 8px; margin-bottom: 6px; }
.fbc-author { font-size: 13px; font-weight: 600; }
.fbc-text { font-size: 14px; line-height: 1.35; }
.fbc-card { display: flex; align-items: stretch; max-width: 280px; border: 1px solid #e4e6eb;
  border-radius: 8px; overflow: hidden; background: #f7f8fa; }
.fbc-thumb { flex: 0 0 auto; width: 56px; height: 56px; object-fit: cover; }
.fbc-card-text { min-width: 0; padding: 7px 10px; align-self: center; }
.fbc-domain { font-size: 11px; letter-spacing: 0.02em; text-transform: uppercase; color: #65676b; }
.fbc-title { font-size: 12.5px; font-weight: 600; line-height: 1.25; display: -webkit-box;
  -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
