/* 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: "Manrope"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/manrope-latin-500-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: "Manrope"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("/assets/fonts/manrope-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+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: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/manrope-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: "Manrope"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("/assets/fonts/manrope-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; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/assets/fonts/manrope-latin-800-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: "Manrope"; font-style: normal; font-weight: 800; font-display: swap;
  src: url("/assets/fonts/manrope-latin-ext-800-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; }
@font-face { font-family: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/dm-serif-display-latin-400-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: "DM Serif Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("/assets/fonts/dm-serif-display-latin-ext-400-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; }
@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 "Manrope", 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: "Manrope", sans-serif; --a-weight: 800; }
.agent-mihkel { --a-bg: #1C1C1C; --a-fg: #F4EEE2; --a-accent: #CBBF9F; --a-accent-fg: #1C1C1C; --a-font: "DM Serif Display", 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: "Manrope", 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); }
