/* Fixed-pixel designs. Print flyer is 816 x 1056 (8.5 x 11 in at 96 px/in);
   social designs are drawn at their real pixel size.
   Colors come from designs.js palette(): --dark (main), --accent, and readable
   text colors worked out from them (--on-dark, --on-accent, --accent-hi for
   accent text on the main color, --accent-lo for accent text on white,
   --dark-text for main-color text on white). */
.d {
  --ink: #1b1b1d;
  --line-on-dark: color-mix(in srgb, var(--on-dark) 20%, transparent);
  position: relative; overflow: hidden; background: #fff; color: var(--ink);
  font-family: Inter, "Segoe UI", Arial, sans-serif; display: flex; flex-direction: column;
  -webkit-font-smoothing: antialiased; text-rendering: geometricPrecision;
}
.d * { box-sizing: border-box; }
.d .fill { width: 100%; height: 100%; object-fit: cover; display: block; }
.d .ph { background: repeating-linear-gradient(45deg, #ece8e0 0 12px, #e3ded3 12px 24px); }
.d .one { white-space: nowrap; overflow: hidden; }
.d .qr-box svg { width: 100%; height: 100%; display: block; }
.d .qr-box { background: #fff; }
.d .initials {
  background: var(--dark); color: var(--on-dark); display: grid; place-items: center;
  font-family: "Playfair Display", Georgia, serif; font-weight: 700; border: 2px solid var(--accent);
}
.d p { margin: 0; }
.d .nw { white-space: nowrap; }

/* ---------- shared contact cards (print) ---------- */
.d .eyebrow { font-size: 9.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent-lo); line-height: 1.3; }
.d .agent-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--soft); min-width: 0; }
.d .a-photo { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; flex: none; font-size: 26px; }
.d .a-text { flex: 1; min-width: 0; }
.d .a-name { font-family: "Playfair Display", Georgia, serif; font-size: 21px; font-weight: 700; line-height: 1.2; text-wrap: balance; }
.d .a-sub { font-size: 11.5px; line-height: 1.3; color: #66625b; margin-top: 1px; text-wrap: balance; }
.d .a-contact, .d .l-contact { margin-top: 5px; }
.d .c-line { font-size: 12px; line-height: 1.42; }
.d .c-line.wrap { overflow-wrap: anywhere; }
/* The agent's company logo sits under their contact lines, like the lender logo. */
.d .a-logo { display: block; height: 30px; width: auto; max-width: 100%; object-fit: contain; object-position: left; margin-top: 7px; }
.d .lender-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; background: var(--dark); color: var(--on-dark); min-width: 0; }
.d .lender-card .eyebrow { color: var(--accent-hi); }
.d .l-photo { width: 78px; height: 78px; border-radius: 50%; object-fit: cover; flex: none; border: 2px solid var(--accent); }
.d .l-text { flex: 1; min-width: 0; }
.d .l-name { font-family: "Playfair Display", Georgia, serif; font-size: 21px; font-weight: 700; line-height: 1.2; }
.d .l-sub { font-size: 11.5px; line-height: 1.3; opacity: .8; margin-top: 1px; }
.d .l-logo { display: block; height: 19px; width: auto; max-width: 100%; object-fit: contain; object-position: left; margin-top: 7px; }
.d .l-qr { width: 104px; flex: none; text-align: center; }
.d .l-qr .qr-box { width: 98px; height: 98px; padding: 4px; margin: 0 auto; }
.d .qr-cap { font-size: 9px; line-height: 1.2; margin-top: 5px; opacity: .85; }
.d .foot { flex: none; display: flex; gap: 10px; align-items: center; padding: 8px 24px; font-size: 8.5px; line-height: 1.35; color: #6b6b6b; }
.d .ehl { width: 22px; height: 22px; flex: none; color: currentColor; }
.d .spec { text-align: center; }
.d .spec b { display: block; font-family: "Playfair Display", Georgia, serif; font-size: 22px; line-height: 1.1; white-space: nowrap; }
.d .spec span { display: block; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: #77726a; margin-top: 2px; white-space: nowrap; }
.d .oh-bar { margin-top: 12px; background: var(--soft); border-left: 4px solid var(--accent); padding: 8px 12px; font-size: 14px; line-height: 1.3; }
.d .oh-bar b { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; margin-right: 10px; color: var(--dark-text); }
.d .hl { list-style: none; margin: 0; padding: 0; font-size: 12.5px; line-height: 1.35; }
.d .hl li { position: relative; padding: 0 0 0 18px; margin: 3px 0 6px; }
.d .hl li::before {
  content: ""; position: absolute; left: 2px; top: 6px; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg);
}
.d .listing-qr { width: 84px; flex: none; text-align: center; font-size: 9.5px; line-height: 1.25; color: #555; }
.d .listing-qr .qr-box { width: 70px; height: 70px; margin: 0 auto 5px; }
.d .listing-qr.big { width: 100px; }
.d .listing-qr.big .qr-box { width: 92px; height: 92px; padding: 3px; }

/* ---------- print flyer: classic ---------- */
.fc-top { height: 66px; flex: none; background: var(--dark); display: flex; justify-content: space-between; align-items: center; padding: 0 32px; gap: 24px; }
.fc-head { flex: 1 1 auto; min-width: 0; color: var(--accent-hi); font-size: 19px; font-weight: 700; letter-spacing: .28em; text-transform: uppercase; }
.fc-price { flex: 0 1 auto; max-width: 58%; color: var(--on-dark); font-family: "Playfair Display", Georgia, serif; font-size: 34px; font-weight: 700; text-align: right; }
.fc-hero { flex: 1 1 0; min-height: 0; }
.fc-strip { height: 146px; flex: none; display: grid; grid-template-rows: minmax(0, 1fr); gap: 8px; padding: 8px 8px 0; }
.fc-body { flex: none; padding: 16px 32px 0; }
.fc-addr-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 22px; }
.fc-addr { flex: 1; min-width: 0; }
.fc-line { font-family: "Playfair Display", Georgia, serif; font-size: 30px; font-weight: 700; line-height: 1.15; text-wrap: balance; }
.fc-city { font-size: 13.5px; line-height: 1.35; color: #66625b; margin-top: 2px; }
.fc-specs { display: flex; gap: 18px; flex: none; }
.fc-desc-row { display: flex; gap: 22px; margin-top: 12px; align-items: flex-start; }
.fc-desc { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.5; color: #3a3a3a; text-wrap: pretty; }
.fc .hl { width: 210px; flex: none; }
.fc-desc-row > .hl:first-child { flex: 1; width: auto; columns: 2; column-gap: 24px; }
.fc-contacts { flex: none; min-height: 172px; margin-top: 14px; display: grid; grid-template-columns: 1fr 1.18fr; }

/* ---------- print flyer: modern ---------- */
.fm-hero { flex: 1 1 0; min-height: 0; position: relative; }
.fm-badge {
  position: absolute; top: 24px; left: 24px; max-width: 70%; background: var(--accent); color: var(--on-accent);
  padding: 8px 16px; font-size: 14px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
}
.fm-over {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 90px 32px 22px; color: #fff;
  background: linear-gradient(rgba(0,0,0,0), rgba(0,0,0,.74)); display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
}
.fm-addr { flex: 1; min-width: 0; }
.fm-line { font-family: "Playfair Display", Georgia, serif; font-size: 36px; font-weight: 700; line-height: 1.12; text-wrap: balance; }
.fm-city { font-size: 15px; line-height: 1.35; opacity: .9; margin-top: 3px; }
.fm-price { font-family: "Playfair Display", Georgia, serif; font-size: 36px; font-weight: 700; flex: none; line-height: 1.12; }
.fm-mid { flex: none; display: grid; grid-template-columns: 262px 1fr; gap: 22px; padding: 16px 32px 0 16px; }
.fm.side-1 .fm-mid, .fm.side-2 .fm-mid { min-height: 290px; }
.fm.side-0 .fm-mid { grid-template-columns: 1fr; padding-left: 32px; }
.fm-photos { display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; min-height: 0; }
.fm.side-1 .fm-photos { grid-template-rows: minmax(0, 1fr); }
.fm-photos > * { min-height: 0; }
.fm-info { display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-width: 0; }
.fm-specs { display: flex; gap: 18px; padding-bottom: 10px; border-bottom: 1px solid #e6e1d7; }
.fm-info .oh-bar { margin-top: 0; }
.fm-desc { font-size: 12.5px; line-height: 1.5; color: #3a3a3a; text-wrap: pretty; }
.fm-bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.fm-bottom .hl { flex: 1; min-width: 0; }
.fm-contacts {
  flex: none; min-height: 166px; margin-top: 16px; background: var(--dark); color: var(--on-dark);
  display: grid; grid-template-columns: 1fr 1px 1.15fr; gap: 0;
}
.fm-div { background: var(--line-on-dark); margin: 22px 0; }
.fm .agent-card { background: none; color: var(--on-dark); }
.fm .agent-card .eyebrow { color: var(--accent-hi); }
.fm .a-sub { color: inherit; opacity: .75; }
.fm .a-logo { background: #fff; padding: 4px 6px; border-radius: 4px; height: 34px; }

/* ---------- social ---------- */
.so { background: var(--dark); }
.so .s-hero { position: relative; flex: 1 1 0; min-height: 0; }
.so .s-badge {
  position: absolute; top: 48px; left: 48px; max-width: calc(100% - 380px); background: var(--accent); color: var(--on-accent);
  padding: 14px 26px; font-size: 28px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; line-height: 1.2;
}
.so .s-logo { position: absolute; top: 48px; right: 48px; width: 250px; height: auto; background: rgba(0,0,0,.5); padding: 12px 16px; border-radius: 6px; }
.so .s-logo.agent { width: auto; background: #fff; padding: 14px 18px; border-radius: 8px; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.so .s-logo.agent img { display: block; max-width: 280px; max-height: 110px; object-fit: contain; }
.so .s-flogo { height: 26px; width: auto; flex: none; margin-left: auto; opacity: 1; }
.so .s-foot span { flex: 1; min-width: 0; }
.so .s-panel { flex: none; background: var(--dark); color: var(--on-dark); padding: 40px 56px 32px; display: flex; flex-direction: column; }
.so .s-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; }
.so .s-addr { flex: 1; min-width: 0; }
.so .s-line { font-family: "Playfair Display", Georgia, serif; font-size: 58px; font-weight: 700; line-height: 1.12; text-wrap: balance; }
.so .s-city { font-size: 28px; line-height: 1.3; opacity: .8; margin-top: 6px; }
.so .s-price { font-family: "Playfair Display", Georgia, serif; font-size: 60px; font-weight: 700; color: var(--accent-hi); flex: none; line-height: 1.12; }
.so .s-specs { margin-top: 20px; font-size: 30px; line-height: 1.3; }
.so .s-specs i { font-style: normal; color: var(--accent-hi); margin: 0 16px; }
.so .s-oh { margin-top: 18px; font-size: 26px; line-height: 1.3; background: color-mix(in srgb, var(--on-dark) 8%, transparent); border-left: 6px solid var(--accent); padding: 12px 18px; }
.so .s-oh b { color: var(--accent-hi); text-transform: uppercase; letter-spacing: .12em; margin-right: 12px; font-size: .85em; }
.so .s-desc { margin-top: 18px; font-size: 25px; line-height: 1.45; opacity: .88; text-wrap: pretty; }
.so .s-people { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding-top: 24px; border-top: 1px solid var(--line-on-dark); }
.so .m-agent, .so .m-lender { display: flex; gap: 18px; align-items: center; min-width: 0; }
.so .m-agent > div:last-child, .so .m-lender > div:last-child { flex: 1; min-width: 0; }
.so .m-photo { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex: none; font-size: 34px; }
.so .m-lender .m-photo { border: 3px solid var(--accent); }
.so .m-eyebrow { font-size: 17px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--accent-hi); line-height: 1.3; }
.so .m-name { font-family: "Playfair Display", Georgia, serif; font-size: 32px; font-weight: 700; line-height: 1.2; }
.so .m-sub { font-size: 21px; line-height: 1.3; opacity: .85; }
.so .s-foot { margin-top: 18px; display: flex; gap: 12px; align-items: center; font-size: 15px; line-height: 1.3; opacity: .7; }
.so .s-foot .ehl { width: 30px; height: 30px; }

.square .s-panel { padding: 30px 48px 22px; }
.square .s-line { font-size: 48px; }
.square .s-city { font-size: 24px; margin-top: 4px; }
.square .s-price { font-size: 50px; }
.square .s-specs { font-size: 26px; margin-top: 12px; }
.square .s-oh { font-size: 22px; margin-top: 12px; padding: 8px 14px; }
.square .s-desc { font-size: 22px; margin-top: 12px; }
.square .s-people { margin-top: 18px; padding-top: 16px; }
.square .m-photo { width: 80px; height: 80px; font-size: 28px; }
.square .m-name { font-size: 28px; }
.square .m-sub { font-size: 19px; }
.square .m-eyebrow { font-size: 15px; }
.square .s-foot { font-size: 13px; margin-top: 12px; }
.square .s-logo { width: 220px; }
.square .s-logo.agent { width: auto; }
.square .s-logo.agent img { max-width: 240px; max-height: 90px; }
.square .s-flogo { height: 22px; }

/* Story: Instagram's progress bar and profile name cover roughly the top 130px;
   the bottom ~250px holds the reply bar. Headline and logo sit just below the top bar. */
.story .s-badge { top: 150px; left: 60px; font-size: 34px; max-width: calc(100% - 440px); }
.story .s-logo { top: 150px; right: 60px; }
.story .st-strip { background: var(--dark); height: 290px; flex: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); gap: 10px; padding: 10px 10px 0; }
.story .s-panel { padding: 44px 60px 210px; }
.story .s-line { font-size: 62px; }
.story .s-price { font-size: 64px; }
.story .s-desc { font-size: 28px; }

.fb { display: grid !important; grid-template-columns: 700px 1fr; }
.fb .fb-photo { position: relative; min-height: 0; }
.fb .s-badge { top: 28px; left: 28px; font-size: 20px; padding: 10px 18px; max-width: calc(100% - 260px); }
.fb .s-logo { top: 28px; right: 28px; width: 180px; padding: 9px 12px; }
.fb .s-logo.agent { width: auto; padding: 10px 12px; }
.fb .s-logo.agent img { max-width: 180px; max-height: 64px; }
.fb .s-flogo { height: 16px; }
.fb .fb-side { background: var(--dark); color: var(--on-dark); padding: 30px 34px 20px; display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.fb .fb-side > * { flex-shrink: 0; }
.fb .fb-main { min-width: 0; }
.fb .s-price { font-size: 46px; }
.fb .s-line { font-size: 30px; margin-top: 6px; }
.fb .s-city { font-size: 18px; margin-top: 2px; }
.fb .fb-specs { display: grid; gap: 8px 10px; margin-top: 14px;
  padding: 10px 0; border-top: 1px solid var(--line-on-dark); border-bottom: 1px solid var(--line-on-dark); }
.fb .spec { text-align: left; }
.fb .spec b { font-size: 24px; color: var(--on-dark); }
.fb .spec span { font-size: 10px; color: var(--accent-hi); }
.fb .s-oh { font-size: 16px; margin-top: 12px; padding: 8px 12px; border-left-width: 4px; }
.fb .s-desc { font-size: 15px; margin-top: 12px; }
.fb .fb-people { margin-top: auto; display: grid; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-on-dark); }
.fb .m-photo { width: 54px; height: 54px; font-size: 20px; }
.fb .m-lender .m-photo { border-width: 2px; }
.fb .m-agent, .fb .m-lender { gap: 12px; }
.fb .m-eyebrow { font-size: 11px; }
.fb .m-name { font-size: 19px; }
.fb .m-sub { font-size: 14px; }
.fb .s-foot { font-size: 10.5px; margin-top: 12px; gap: 8px; }
.fb .s-foot .ehl { width: 20px; height: 20px; }
