.v3 .lip-hero { padding-bottom: clamp(2rem, 5vh, 3.25rem); }
.v3 .lip-tool { padding-bottom: var(--rhythm-tight); }
.v3 .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.v3 .lip-display-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s3); margin-bottom: var(--s7); }
.v3 .lip-segment { display: inline-flex; margin: 0; padding: 4px; border: 1px solid var(--hair); border-radius: var(--r-pill); background: rgba(9,20,14,.42); }
.v3 .lip-segment label { cursor: pointer; }
.v3 .lip-segment input { position: absolute; opacity: 0; pointer-events: none; }
.v3 .lip-segment span { display: flex; min-height: 38px; align-items: center; gap: .42rem; padding: .52rem .85rem; border-radius: var(--r-pill); color: var(--tx-3); font-size: var(--fs-xs); font-weight: 650; transition: color .2s, background .2s; }
.v3 .lip-segment svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.v3 .lip-segment input:checked + span { background: var(--ochre); color: var(--on-ochre); }
.v3 .lip-segment input:focus-visible + span { outline: 2px solid var(--ochre-hi); outline-offset: 2px; }

.v3 .lip-workspace { display: grid; grid-template-columns: minmax(420px, 1.05fr) minmax(430px, .95fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.v3 .lip-editor { min-width: 0; }
.v3 .lip-author-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); margin-bottom: var(--s5); }
.v3 .lip-post-field textarea { min-height: 290px; }
.v3 .lip-editor-tools { display: flex; min-height: 48px; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--hair); color: var(--tx-3); }
.v3 .lip-upload { display: inline-flex; align-items: center; gap: .38rem; cursor: pointer; font-size: var(--fs-xs); font-weight: 650; }
.v3 .lip-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.v3 .lip-upload:focus-within { color: var(--ochre-hi); outline: 2px solid var(--ochre-hi); outline-offset: 3px; }
.v3 .lip-upload svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.v3 .lip-select-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
.v3 .lip-editor-tools select { min-height: 34px; max-width: 132px; border: 0; background: transparent; color: var(--tx-2); font: inherit; font-size: var(--fs-xs); }
.v3 .lip-editor-tools select option { background: #10241a; color: var(--tx-1); }
.v3 .lip-tool-separator { width: 1px; height: 19px; background: var(--hair); }
.v3 .lip-mini-button,
.v3 .lip-remove { display: inline-flex; min-width: 30px; min-height: 30px; align-items: center; justify-content: center; border: 0; border-radius: var(--r-sm); background: transparent; color: var(--tx-3); cursor: pointer; font: inherit; font-weight: 700; }
.v3 .lip-mini-button:hover,
.v3 .lip-remove:hover { background: rgba(183,127,60,.12); color: var(--ochre-hi); }
.v3 .lip-emoji { font-size: 1rem; }
.v3 .lip-remove { min-width: auto; padding: 0 .3rem; font-size: var(--fs-micro); font-weight: 600; }
.v3 .lip-remove[hidden] { display: none; }
.v3 .lip-editor-tools output { margin-left: auto; font-size: var(--fs-xs); font-variant-numeric: tabular-nums; }

.v3 .lip-preview-panel { min-width: 0; }
.v3 .lip-preview-panel > header { margin-bottom: var(--s5); text-align: center; }
.v3 .lip-preview-panel > header h2 { margin: 0; color: var(--tx-1); font-size: 1.25rem; }
.v3 .lip-preview-panel > header p { margin: .35rem 0 0; color: var(--tx-3); font-size: var(--fs-small); }
.v3 .lip-device-stage { display: flex; min-height: 340px; justify-content: center; align-items: flex-start; }
.v3 .lip-card { --li-bg: #fff; --li-text: rgba(0,0,0,.9); --li-muted: rgba(0,0,0,.55); --li-faint: rgba(0,0,0,.08); width: min(100%, 507px); overflow: visible; border-radius: 8px; background: var(--li-bg); box-shadow: 0 20px 50px -20px rgba(0,0,0,.45), 0 4px 16px -8px rgba(0,0,0,.25); color: var(--li-text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; line-height: 1.5; transition: width .3s ease, background .25s ease; zoom: calc(1 / var(--zoom, 1)); }
.v3 .lip-card[data-device="tablet"] { width: min(100%, 423px); }
.v3 .lip-card[data-device="mobile"] { width: min(100%, 400px); }
.v3 .lip-card[data-theme="dark"] { --li-bg: #1b1f23; --li-text: rgba(255,255,255,.9); --li-muted: rgba(255,255,255,.6); --li-faint: rgba(255,255,255,.12); border-color: rgba(255,255,255,.08); }
.v3 .lip-card__header { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px 8px; }
.v3 .lip-card[data-device="tablet"] .lip-card__header,
.v3 .lip-card[data-device="mobile"] .lip-card__header { padding: 16px 16px 8px; }
.v3 .lip-avatar { position: relative; width: 48px; height: 48px; overflow: hidden; border-radius: 50%; background: #d7e7df; color: #1b3b2f; font-size: 20px; font-weight: 700; }
.v3 .lip-avatar span,
.v3 .lip-avatar img { display: flex; width: 100%; height: 100%; align-items: center; justify-content: center; object-fit: cover; }
.v3 .lip-avatar [hidden] { display: none; }
.v3 .lip-identity { display: flex; min-width: 0; flex-direction: column; line-height: 1.33; }
.v3 .lip-identity { flex: 1; }
.v3 .lip-identity strong { overflow: hidden; color: var(--li-text); font-size: 16px; font-weight: 700; line-height: 1.3; text-overflow: ellipsis; white-space: nowrap; }
.v3 .lip-identity > span:not(.lip-meta) { overflow: hidden; color: var(--li-muted); font-size: 12px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.v3 .lip-meta { display: flex; align-items: center; gap: 4px; margin-top: 4px; color: var(--li-muted); font-size: 12px; }
.v3 .lip-meta i { font-style: normal; }
.v3 .lip-meta svg { width: 13px; height: 13px; fill: currentColor; }
.v3 .lip-post-action { display: inline-flex; flex: none; align-items: center; gap: 4px; padding: 6px 12px; border: 0; border-radius: 6px; background: #d7f205; color: rgba(0,0,0,.9); cursor: pointer; font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.4; }
.v3 .lip-post-action:hover:not(:disabled) { background: #c5d904; }
.v3 .lip-post-action:disabled { cursor: not-allowed; opacity: .45; }
.v3 .lip-post-action svg { width: 10px; height: 6px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.v3 .lip-card__content { padding: 0 16px 16px; }
.v3 .lip-body { position: relative; min-height: 44px; }
.v3 .lip-body p { margin: 0; color: color-mix(in srgb, var(--li-text) 44%, transparent); font-size: 15px; line-height: 1.5; }
.v3 .lip-post-text { color: var(--li-text); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; white-space: pre-wrap; word-break: break-word; }
.v3 .lip-see-more { display: inline; border: 0; background: transparent; color: var(--li-muted); cursor: pointer; font: inherit; font-size: 14px; line-height: 1.5; padding: 0 0 0 .8rem; vertical-align: baseline; white-space: nowrap; }
.v3 .lip-see-more[hidden] { display: none; }
.v3 .lip-see-more:hover { color: var(--li-text); }
.v3 .lip-measure { position: absolute; inset: 0 0 auto; visibility: hidden; pointer-events: none; z-index: -1; }
.v3 .lip-measure__toggle { padding-left: .8rem; color: var(--li-muted); white-space: nowrap; }
.v3 .lip-media { width: 100%; margin: 12px 0 0; aspect-ratio: 1.91 / 1; overflow: hidden; border-radius: 2px; background: var(--li-faint); }
.v3 .lip-media img { width: 100%; height: 100%; object-fit: cover; }
.v3 .lip-engagement { display: flex; height: 32px; align-items: center; justify-content: space-between; gap: 12px; color: var(--li-muted); font-size: 12px; }
.v3 .lip-reactions { display: inline-flex; align-items: center; gap: 8px; }
.v3 .lip-reactions i { display: grid; width: 16px; height: 16px; place-items: center; border: 1px solid var(--li-bg); border-radius: 50%; background: #378fe9; color: #fff; }
.v3 .lip-reactions svg { width: 10px; height: 10px; fill: currentColor; }
.v3 .lip-reactions > span { font-size: 14px; opacity: .6; }
.v3 .lip-counts { display: inline-flex; gap: 12px; }
.v3 .lip-counts > span { font-size: 14px; opacity: .6; }
.v3 .lip-actions { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--li-faint); }
.v3 .lip-actions button { display: flex; min-width: 0; align-items: center; justify-content: center; gap: 8px; padding: 8px 16px; border: 0; border-radius: 4px; background: transparent; color: var(--li-muted); font-family: inherit; font-size: 14px; font-weight: 500; line-height: 1.4; pointer-events: none; opacity: .6; }
.v3 .lip-actions button span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v3 .lip-actions svg { width: 20px; height: 20px; flex: none; }
.v3 .lip-fidelity-note { max-width: 555px; margin: var(--s4) auto 0; color: var(--tx-3); font-size: var(--fs-xs); line-height: 1.5; text-align: center; }

@media (max-width: 980px) {
  .v3 .lip-workspace { grid-template-columns: 1fr; }
  .v3 .lip-preview-panel { order: -1; }
  .v3 .lip-device-stage { min-height: 0; }
}

@media (max-width: 680px) {
  .v3 .lip-display-controls { margin-bottom: var(--s6); }
  .v3 .lip-segment { width: 100%; }
  .v3 .lip-segment label { flex: 1; }
  .v3 .lip-segment span { justify-content: center; padding-inline: .45rem; }
  .v3 .lip-segment--theme { width: auto; }
  .v3 .lip-segment--theme label { flex: none; }
  .v3 .lip-author-fields { grid-template-columns: 1fr; }
  .v3 .lip-post-field textarea { min-height: 240px; }
  .v3 .lip-editor-tools { gap: .55rem .65rem; }
  .v3 .lip-upload { min-height: 36px; }
  .v3 .lip-editor-tools output { width: 100%; margin-top: var(--s2); text-align: right; }
  .v3 .lip-card { border-radius: 6px; }
  .v3 .lip-post-action { position: absolute; left: 50%; bottom: calc(100% + 12px); transform: translateX(-50%); z-index: 10; white-space: nowrap; }
  .v3 .lip-actions button { gap: 6px; padding-inline: 8px; font-size: 12px; }
  .v3 .lip-actions svg { width: 16px; height: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .v3 .lip-card,
  .v3 .lip-segment span { transition: none; }
}

/* ---- layout v2 (2026-09-30): preview leads, controls live on it ----------
   Preview column first, editor second. Device and theme are a caption line
   under the card ("Viewing on Desktop · Tablet · Phone"),
   plain words rather than a control strip, and the editor's tools sit on top
   of the text box as a format bar, with the counter under it. */
.v3 .lip-workspace { grid-template-columns: minmax(430px, .95fr) minmax(420px, 1.05fr); }
.v3 .lip-preview-panel { position: sticky; top: calc(96px + env(safe-area-inset-top)); }
.v3 .lip-preview-panel > .lip-view-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--s3);
  margin-bottom: var(--s4); text-align: left; }
.v3 .lip-preview-panel > .lip-view-bar h2 { margin: 0; color: var(--tx-3); font-family: inherit; font-size: var(--fs-label); font-weight: 700; letter-spacing: .15em; text-transform: uppercase; }

.v3 .lip-post-field .lip-editor-tools { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: .35rem 0 0; padding: .3rem .55rem; min-height: 44px; gap: .25rem .5rem;
  border: 1px solid var(--hair); border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; background: rgba(9,20,14,.35); }
.v3 .lip-post-field .lip-editor-tools + textarea { border-top-left-radius: 0; border-top-right-radius: 0; }
.v3 .lip-post-field .lip-editor-tools > * { flex: none; }
.v3 .lip-post-field .lip-editor-tools select { max-width: 104px; }
.v3 .lip-post-field > output { display: block; margin-top: .45rem; color: var(--tx-4); font-size: var(--fs-xs); font-variant-numeric: tabular-nums; text-align: right; }

@media (max-width: 980px) {
  .v3 .lip-workspace { grid-template-columns: 1fr; }
  .v3 .lip-preview-panel { position: static; }
}
@media (max-width: 680px) {
      .v3 .lip-post-field .lip-editor-tools .lip-select-label { display: none; }
  /* the post button sat above the card here; the view bar lives there now */
  .v3 .lip-card .lip-post-action { position: static; transform: none; }
}

/* the caption: words, not buttons; the live choice is ochre and underlined */
.v3 .lip-caption { display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline; gap: .35rem 1.1rem; margin-top: var(--s4);
  color: var(--tx-4); font-size: var(--fs-small); }
.v3 .lip-caption__set { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .15rem; margin: 0; padding: 0; border: 0; }
.v3 .lip-caption__lead { margin-right: .3rem; }
.v3 .lip-caption label { position: relative; cursor: pointer; }
.v3 .lip-caption label + label::before { content: "·"; margin: 0 .35rem; color: var(--tx-4); }
.v3 .lip-caption input { position: absolute; opacity: 0; pointer-events: none; }
.v3 .lip-caption span:not(.lip-caption__lead) { color: var(--tx-3); text-decoration: underline; text-decoration-color: transparent;
  text-underline-offset: .3em; text-decoration-thickness: 1.5px; transition: color .2s, text-decoration-color .2s; }
.v3 .lip-caption label:hover span { color: var(--tx-1); }
.v3 .lip-caption input:checked + span { color: var(--ochre-hi); text-decoration-color: currentColor; }
.v3 .lip-caption input:focus-visible + span { outline: 2px solid var(--ochre-hi); outline-offset: 3px; border-radius: 2px; }
.v3 .lip-caption + .lip-fidelity-note { margin-top: var(--s3); }
/* the caption reads as the card's own caption: no reserved gap between them */
.v3 .lip-preview-panel .lip-device-stage { min-height: 0; }
/* Post to LinkedIn wears Arrel's ochre, not a lime of its own */
.v3 .lip-post-action { background: linear-gradient(180deg, color-mix(in srgb, var(--ochre-hi) 38%, var(--ochre)), var(--ochre)); color: var(--on-ochre); font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.v3 .lip-post-action:hover:not(:disabled) { background: var(--ochre-hi); }
/* house-format buttons: B / I / → and the one-click Arrel format */
.v3 .lip-fmt { font-size: 1rem; }
.v3 .lip-arrel-format { display: inline-flex; min-height: 30px; align-items: center; padding: 0 .7rem; border: 1px solid rgba(233,196,138,.45); border-radius: var(--r-pill);
  background: rgba(183,127,60,.14); color: var(--ochre-hi); cursor: pointer; font: inherit; font-size: var(--fs-xs); font-weight: 700; white-space: nowrap; }
.v3 .lip-arrel-format:hover { background: rgba(183,127,60,.26); }
.v3 .lip-arrel-format:focus-visible, .v3 .lip-fmt:focus-visible { outline: 2px solid var(--ochre-hi); outline-offset: 2px; }
/* with the format buttons the bar no longer fits one line: wrap, don't hide */
.v3 .lip-post-field .lip-editor-tools { flex-wrap: wrap; overflow: visible; row-gap: .15rem; }
