.lf-asm /* Home assembly demo — scan scraps assemble into a Word-style draft.
   Scoped under .lf-asm; no rules may leak outside the demo card. */
.lf-asm, .lf-asm *, .lf-asm *::before, .lf-asm *::after { box-sizing: border-box; }
.lf-asm {
  --cream: #f3ede0;
  --ink: #171410;
  --muted: #6a6256;
  --gold: #d6a85b;
  --gold-ink: #8a6a2a;
  --mark: #f3dfae;
  --paper: #fff;
  --line: rgba(23,20,16,.13);
  --office-blue: #2b579a;
  --office-blue-soft: #e8f0fb;
  --editor-line: #d8dbe0;
  --editor-canvas: #d9dce1;
  --ease: cubic-bezier(.22,1,.36,1);
  --settle: cubic-bezier(.2,.78,.24,1);
  --serif: "Newsreader", "Times New Roman", Times, serif;
  --sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}


.lf-asm.browser {
  width: min(940px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(23,20,16,.13);
  border-radius: 6px;
  background: white;
  box-shadow: 0 12px 36px rgba(23,20,16,.12);
}
.lf-asm .chrome {
  display: grid;
  min-height: 43px;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 0 14px;
  border-bottom: 1px solid rgba(23,20,16,.1);
  background: #faf8f3;
}
.lf-asm .dots { display: flex; gap: 6px; }
.lf-asm .dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d8d0c1;
}
.lf-asm .address {
  overflow: hidden;
  color: #766e61;
  font-size: 11px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lf-asm .replay {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
}
.lf-asm .replay:hover { background: #eee8da; color: var(--ink); }
.lf-asm .replay:focus-visible { outline: 2px solid var(--gold-ink); outline-offset: 2px; }
.lf-asm .workspace-bar {
  display: grid;
  min-height: 46px;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.lf-asm .file-name {
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lf-asm .process-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 140px;
  color: var(--gold-ink);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .12em;
  text-align: center;
  text-transform: uppercase;
}
.lf-asm .process-status::before {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px rgba(214,168,91,.17);
  content: "";
}
.lf-asm.demo.complete .process-status {
  color: #4f7550;
}
.lf-asm.demo.complete .process-status::before {
  background: #5d815f;
  box-shadow: 0 0 0 4px rgba(79,117,80,.14);
}
.lf-asm .page-count {
  justify-self: end;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}
.lf-asm .stage {
  position: relative;
  display: grid;
  min-height: 724px;
  place-items: center;
  overflow: hidden;
  padding: 34px 36px 30px;
  background:
    radial-gradient(circle at 50% -25%, rgba(214,168,91,.16), transparent 48%),
    #ece6d9;
  transition: background-color 1.05s ease;
}
.lf-asm.demo.assembling .stage {
  background-color: #e3e5e8;
  background-image: radial-gradient(circle at 50% -30%, rgba(255,255,255,.7), transparent 50%);
}
.lf-asm .stage::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(23,20,16,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(23,20,16,.025) 1px, transparent 1px);
  background-size: 24px 24px;
  content: "";
  mask-image: linear-gradient(to bottom, black, transparent 85%);
  opacity: 1;
  transition: opacity .9s ease;
}
.lf-asm.demo.assembling .stage::before { opacity: 0; }
.lf-asm .doc-shell {
  position: relative;
  width: min(760px, 100%);
  height: 658px;
}
.lf-asm .editor-window {
  position: relative;
  width: 100%;
  height: 100%;
  transform-origin: 50% 48%;
  transition:
    opacity .58s ease,
    filter .58s ease,
    transform .72s var(--ease);
}
.lf-asm .editor-window::before {
  position: absolute;
  z-index: 0;
  inset: 0;
  border: 1px solid rgba(73,79,89,.24);
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(37,43,51,.18), 0 3px 10px rgba(37,43,51,.08);
  content: "";
  filter: blur(9px);
  opacity: 0;
  transform: scale(.972);
  transform-origin: 50% 48%;
  transition:
    opacity .72s ease,
    filter .92s var(--ease),
    transform 1.02s var(--ease);
}
.lf-asm.demo.assembling .editor-window::before {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}
.lf-asm.demo.exhaling .editor-window {
  filter: blur(.75px);
  opacity: 0;
  transform: translateY(4px) scale(.988);
}
.lf-asm .editor-ui {
  position: relative;
  z-index: 3;
  filter: blur(7px);
  opacity: 0;
  transform: scale(.98);
  transform-origin: 50% 0;
  transition:
    opacity .62s ease .05s,
    filter .9s var(--ease),
    transform .96s var(--ease);
}
.lf-asm.demo.assembling .editor-ui {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}
.lf-asm .editor-titlebar {
  display: grid;
  height: 31px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--editor-line);
  background: #f7f8fa;
  color: #333842;
  font-size: 10px;
}
.lf-asm .editor-file-title {
  grid-column: 2;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .005em;
  white-space: nowrap;
}
.lf-asm .window-controls {
  display: flex;
  justify-self: end;
  height: 100%;
}
.lf-asm .window-controls i {
  display: grid;
  width: 31px;
  place-items: center;
  color: #777d86;
  font-style: normal;
  font-size: 10px;
}
.lf-asm .ribbon {
  height: 91px;
  border-bottom: 1px solid #cfd3d9;
  background: #fbfbfc;
}
.lf-asm .ribbon-tabs {
  display: flex;
  height: 29px;
  align-items: end;
  gap: 3px;
  padding: 0 12px;
  border-bottom: 1px solid #e6e7ea;
}
.lf-asm .ribbon-tab {
  position: relative;
  height: 28px;
  padding: 8px 10px 6px;
  color: #555b65;
  font-size: 9px;
  white-space: nowrap;
}
.lf-asm .ribbon-tab.selected {
  color: var(--office-blue);
  font-weight: 700;
}
.lf-asm .ribbon-tab.selected::after {
  position: absolute;
  right: 8px;
  bottom: -1px;
  left: 8px;
  height: 2px;
  background: var(--office-blue);
  content: "";
}
.lf-asm .ribbon-content {
  display: flex;
  height: 61px;
  align-items: stretch;
  padding: 5px 10px 4px;
}
.lf-asm .ribbon-tools {
  display: grid;
  width: 110px;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  align-items: center;
  padding-right: 10px;
  border-right: 1px solid #dedfe3;
}
.lf-asm .tool-line {
  display: block;
  height: 4px;
  border-radius: 1px;
  background: #8a9099;
}
.lf-asm .tool-line:nth-child(2n) { width: 76%; }
.lf-asm .tool-letter {
  color: #4f555e;
  font-family: Georgia, serif;
  font-size: 16px;
  font-weight: 700;
  text-align: center;
}
.lf-asm .styles-group {
  position: relative;
  display: flex;
  min-width: 0;
  flex: 1;
  align-items: center;
  padding: 0 8px 8px 11px;
}
.lf-asm .styles-gallery {
  display: grid;
  width: min(430px, 100%);
  grid-template-columns: repeat(5, minmax(58px,1fr));
  gap: 4px;
}
.lf-asm .style-tile {
  display: grid;
  height: 39px;
  place-items: center;
  overflow: hidden;
  padding: 3px 5px;
  border: 1px solid #d5d8dd;
  border-radius: 2px;
  background: #fff;
  color: #20242b;
  transition:
    border-color .2s ease,
    background-color .2s ease,
    box-shadow .2s ease,
    transform .2s ease;
}
.lf-asm .style-tile.active {
  border-color: var(--office-blue);
  background: var(--office-blue-soft);
  box-shadow: inset 0 0 0 1px rgba(43,87,154,.15);
}
.lf-asm .style-tile.pulse {
  animation: gallery-pulse .68s var(--ease) both;
}
.lf-asm .style-preview {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lf-asm .style-tile[data-style="Title"] .style-preview {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .035em;
  text-align: center;
}
.lf-asm .style-tile[data-style="Heading 1"] .style-preview {
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}
.lf-asm .style-tile[data-style="Definition 1"] .style-preview {
  font-family: var(--serif);
  font-size: 10.5px;
  font-weight: 600;
}
.lf-asm .style-tile[data-style="Body 1"] .style-preview {
  font-family: var(--serif);
  font-size: 11px;
}
.lf-asm .style-tile[data-style="Footnote"] .style-preview {
  font-family: var(--serif);
  font-size: 8px;
}
.lf-asm .styles-caption {
  position: absolute;
  right: 11px;
  bottom: -1px;
  left: 11px;
  color: #777d86;
  font-size: 7px;
  letter-spacing: .08em;
  text-align: center;
  text-transform: uppercase;
}
.lf-asm .ruler {
  position: relative;
  height: 25px;
  border-bottom: 1px solid #c9cdd3;
  background: #f4f5f7;
}
.lf-asm .ruler-track {
  position: absolute;
  top: 5px;
  right: 116px;
  left: 116px;
  height: 14px;
  border: 1px solid #d3d6db;
  background:
    repeating-linear-gradient(90deg, #7f858e 0 1px, transparent 1px 25px),
    repeating-linear-gradient(90deg, transparent 0 12px, rgba(127,133,142,.55) 12px 13px, transparent 13px 25px),
    #fff;
  background-position: 0 8px, 0 11px, 0 0;
  background-size: 25px 5px, 25px 3px, auto;
}
.lf-asm .ruler-track::before, .lf-asm .ruler-track::after {
  position: absolute;
  top: -3px;
  width: 0;
  height: 0;
  border-right: 4px solid transparent;
  border-left: 4px solid transparent;
  border-top: 5px solid var(--office-blue);
  content: "";
}
.lf-asm .ruler-track::before { left: 12px; }
.lf-asm .ruler-track::after { right: 12px; }
.lf-asm .editor-canvas {
  position: relative;
  height: 484px;
  overflow: hidden;
}
.lf-asm .editor-canvas::before {
  position: absolute;
  inset: 0;
  background: var(--editor-canvas);
  content: "";
  filter: blur(7px);
  opacity: 0;
  transform: scale(.984);
  transition:
    opacity .72s ease,
    filter .9s var(--ease),
    transform 1s var(--ease);
}
.lf-asm.demo.assembling .editor-canvas::before {
  filter: blur(0);
  opacity: 1;
  transform: scale(1);
}
.lf-asm .editor-statusbar {
  display: grid;
  height: 27px;
  grid-template-columns: minmax(0,1fr) auto minmax(0,1fr);
  align-items: center;
  padding: 0 11px;
  border-top: 1px solid #c9cdd3;
  background: #f6f7f8;
  color: #545a64;
  font-size: 8px;
  white-space: nowrap;
}
.lf-asm .editor-page-status {
  overflow: hidden;
  text-overflow: ellipsis;
}
.lf-asm .editor-flow {
  padding: 0 12px;
  color: var(--office-blue);
  font-weight: 600;
}
.lf-asm .editor-zoom {
  justify-self: end;
  font-variant-numeric: tabular-nums;
}
.lf-asm .paper {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 50%;
  width: 508px;
  height: 456px;
  overflow: hidden;
  border: 1px solid rgba(23,20,16,.14);
  border-radius: 1px;
  background: var(--paper);
  box-shadow: 0 18px 34px rgba(23,20,16,.16), 0 2px 5px rgba(23,20,16,.08);
  opacity: 1;
  transform: translateX(-50%) rotate(-1.15deg) translateY(4px);
  transform-origin: 50% 42%;
  transition:
    opacity .58s ease,
    filter .58s ease,
    transform 1.05s var(--ease),
    background-color .8s ease,
    box-shadow .8s ease;
}
.lf-asm.demo.assembling .paper {
  background: #fff;
  box-shadow: 0 7px 22px rgba(39,44,53,.20), 0 1px 3px rgba(39,44,53,.16);
  transform: translateX(-50%);
}
.lf-asm .patina {
  position: absolute;
  z-index: 0;
  inset: 0;
  background:
    radial-gradient(ellipse 17% 10% at 88% 13%, rgba(121,83,38,.20), transparent 70%),
    radial-gradient(ellipse 22% 13% at 13% 81%, rgba(121,83,38,.15), transparent 72%),
    radial-gradient(circle at 70% 59%, rgba(83,60,31,.09) 0 1px, transparent 2px),
    repeating-linear-gradient(3deg, rgba(38,31,23,.055) 0 1px, transparent 1px 7px),
    #e8dfcd;
  opacity: .9;
  transition: opacity 1.1s ease .12s;
}
.lf-asm.demo.assembling .patina { opacity: 0; }
.lf-asm .patina::after {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(23,20,16,.28) .45px, transparent .7px);
  background-size: 4px 4px;
  content: "";
  mix-blend-mode: multiply;
  opacity: .3;
}
.lf-asm .page-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  padding: 47px 60px 33px 69px;
}
.lf-asm .page-meta {
  position: absolute;
  top: 20px;
  left: 27px;
  color: rgba(23,20,16,.45);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 7px;
  letter-spacing: .11em;
  text-transform: uppercase;
  transition: opacity .55s ease;
}
.lf-asm.demo.assembling .page-meta { opacity: 0; }
.lf-asm .piece {
  position: relative;
  z-index: 2;
  color: rgba(25,23,19,.78);
  font-family: "Courier New", Courier, monospace;
  text-shadow: .5px 0 rgba(23,20,16,.36), -.5px .4px rgba(23,20,16,.2);
  filter: blur(.16px);
  transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s));
  transform-origin: 12% 50%;
  transition:
    color .38s ease,
    filter .38s ease,
    text-shadow .38s ease,
    font-size .58s var(--ease),
    letter-spacing .58s var(--ease);
  will-change: transform;
}
.lf-asm .piece::before {
  position: absolute;
  z-index: -1;
  inset: -7px -11px -6px -10px;
  clip-path: var(--tear);
  background:
    radial-gradient(circle at 14% 22%, rgba(255,255,255,.32), transparent 34%),
    repeating-linear-gradient(2deg, rgba(50,39,26,.035) 0 1px, transparent 1px 6px),
    #e5dac4;
  box-shadow:
    0 8px 13px rgba(23,20,16,.18),
    0 2px 3px rgba(23,20,16,.13);
  content: "";
  opacity: .98;
  transform: rotate(var(--chip-r)) scale(var(--chip-s));
  transform-origin: 18% 50%;
}
.lf-asm .piece::after {
  position: absolute;
  top: 50%;
  right: -53px;
  z-index: 4;
  padding: 5px 7px 4px;
  border: 1px solid rgba(43,87,154,.28);
  border-radius: 3px;
  background: #f8fbff;
  box-shadow: 0 2px 7px rgba(23,20,16,.07);
  color: var(--office-blue);
  font-family: var(--sans);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .045em;
  line-height: 1;
  text-shadow: none;
  white-space: nowrap;
  content: attr(data-style);
  opacity: 0;
  transform: translate(7px,-50%) scale(.92);
}
.lf-asm .piece.landing, .lf-asm .piece.landed {
  color: var(--ink);
  filter: none;
  text-shadow: none;
}
.lf-asm .piece.landing {
  animation: land-piece .74s var(--settle) both;
}
.lf-asm .piece.landing::before {
  animation: scrap-release .58s ease-out both;
}
.lf-asm .piece.landed { transform: none; }
.lf-asm .piece.landed::before {
  box-shadow: none;
  opacity: 0;
  transform: rotate(0) scale(.985);
}
.lf-asm .piece.landing::after {
  animation: style-stamp .34s var(--ease) both;
}
.lf-asm .piece.landed::after {
  opacity: 1;
  transform: translate(0,-50%) scale(1);
}
.lf-asm .case-piece { text-transform: uppercase; }
.lf-asm .case-piece.landed { text-transform: none; }
.lf-asm .title-piece {
  --x: -72px;
  --y: 31px;
  --r: -3.4deg;
  --s: .965;
  --chip-r: .7deg;
  --chip-s: 1.012;
  --tear: polygon(0 5%, 8% 1%, 19% 4%, 31% 0, 44% 3%, 59% 1%, 72% 4%, 86% 1%, 100% 5%, 98% 91%, 91% 96%, 79% 93%, 67% 98%, 51% 94%, 37% 97%, 24% 93%, 11% 97%, 1% 92%);
  margin-bottom: 18px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .12em;
  line-height: 1.1;
  text-align: left;
}
.lf-asm .title-piece.landed {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: .09em;
  text-align: center;
}
.lf-asm .heading-piece {
  --x: 72px;
  --y: -15px;
  --r: 2.65deg;
  --s: 1.018;
  --chip-r: -.5deg;
  --chip-s: .997;
  --tear: polygon(1% 8%, 12% 3%, 25% 6%, 39% 1%, 53% 5%, 68% 2%, 82% 6%, 99% 2%, 100% 92%, 88% 96%, 74% 92%, 59% 98%, 42% 93%, 28% 97%, 13% 92%, 0 96%);
  margin: 0 0 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .04em;
  line-height: 1.35;
}
.lf-asm .heading-piece.landed {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .02em;
}
.lf-asm .body-piece {
  --x: -52px;
  --y: 31px;
  --r: -1.8deg;
  --s: .982;
  --chip-r: .35deg;
  --chip-s: 1.006;
  --tear: polygon(0 3%, 10% 1%, 22% 4%, 35% 0, 47% 3%, 62% 1%, 77% 4%, 89% 1%, 100% 4%, 99% 95%, 90% 98%, 78% 94%, 65% 99%, 51% 95%, 36% 98%, 20% 94%, 8% 98%, 0 94%);
  display: grid;
  grid-template-columns: 23px 1fr;
  gap: 0;
  margin: 0 0 20px;
  font-size: 9.6px;
  line-height: 1.55;
}
.lf-asm .body-piece.landed {
  font-family: var(--serif);
  font-size: 11.6px;
  line-height: 1.5;
}
.lf-asm .second-heading {
  --x: 64px;
  --y: 18px;
  --r: 1.75deg;
  --s: .974;
  --chip-r: -.65deg;
  margin-top: 3px;
}
.lf-asm .second-body {
  --x: -43px;
  --y: -14px;
  --r: -1.15deg;
  --s: 1.015;
  --chip-r: .8deg;
}
.lf-asm .clause-no {
  display: inline-block;
  color: inherit;
  font-weight: 700;
  transform: translateX(-30px) rotate(-9deg);
}
.lf-asm .piece.landing .clause-no {
  animation: clause-settle .5s cubic-bezier(.2,1.32,.35,1) .15s both;
}
.lf-asm .piece.landed .clause-no { transform: none; }
.lf-asm mark {
  margin: 0 -1px;
  padding: 0 2px;
  border-radius: 2px;
  background: var(--mark);
  color: inherit;
  box-shadow: inset 0 -1px rgba(138,106,42,.23);
}
.lf-asm mark.flag-beat {
  animation: mark-pulse .9s ease-out both;
}
.lf-asm .text-cursor {
  display: inline-block;
  width: 1px;
  height: .95em;
  margin-left: 1px;
  background: var(--ink);
  opacity: 0;
  vertical-align: -.1em;
}
.lf-asm.demo.cursor-ready .text-cursor {
  animation: cursor-blink .92s steps(1,end) infinite;
}
.lf-asm .footnote-piece {
  --x: 45px;
  --y: 82px;
  --r: 2.25deg;
  --s: .972;
  --chip-r: -.5deg;
  --chip-s: 1.008;
  --tear: polygon(1% 9%, 14% 2%, 30% 6%, 44% 1%, 58% 5%, 75% 2%, 88% 6%, 100% 1%, 99% 90%, 89% 97%, 73% 93%, 57% 98%, 39% 94%, 23% 98%, 9% 92%, 0 96%);
  position: absolute;
  right: 60px;
  bottom: 29px;
  left: 69px;
  padding-top: 9px;
  font-size: 8px;
  line-height: 1.4;
}
.lf-asm .footnote-piece.landed {
  font-family: var(--serif);
  font-size: 9px;
}
.lf-asm .footnote-rule {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(.08);
  transform-origin: left;
}
.lf-asm .footnote-piece.landing .footnote-rule {
  animation: rule-draw .72s var(--ease) .16s both;
}
.lf-asm .footnote-piece.landed .footnote-rule { transform: scaleX(1); }
.lf-asm .outline {
  --rail-progress: 0;
  position: absolute;
  z-index: 3;
  top: 54px;
  bottom: 49px;
  left: 22px;
  width: 31px;
  color: var(--gold-ink);
  opacity: 0;
  transform: translateX(-7px);
  transition: opacity .35s ease, transform .55s var(--ease);
}
.lf-asm .outline.active {
  opacity: 1;
  transform: none;
}
.lf-asm .outline-line {
  position: absolute;
  top: 12px;
  bottom: 12px;
  left: 7px;
  width: 1px;
  background: rgba(138,106,42,.35);
  transform: scaleY(var(--rail-progress));
  transform-origin: top;
  transition: transform .52s var(--ease);
}
.lf-asm .node {
  position: absolute;
  left: 3px;
  width: 9px;
  height: 9px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 1px rgba(138,106,42,.38);
  opacity: 0;
  transform: scale(.3);
}
.lf-asm .node.on {
  animation: node-pop .4s cubic-bezier(.2,1.38,.35,1) both;
}
.lf-asm .node[data-node="0"] { top: 2%; }
.lf-asm .node[data-node="1"] { top: 17%; }
.lf-asm .node[data-node="2"] { top: 30%; }
.lf-asm .node[data-node="3"] { top: 51%; }
.lf-asm .node[data-node="4"] { top: 65%; }
.lf-asm .node[data-node="5"] { top: 95%; }
.lf-asm .outline-label {
  position: absolute;
  bottom: -4px;
  left: -2px;
  font-family: var(--sans);
  font-size: 6px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
  transform: rotate(-90deg) translateX(-100%);
  transform-origin: left top;
  white-space: nowrap;
}
.lf-asm .quality-strip {
  display: grid;
  min-height: 47px;
  grid-template-columns: repeat(3,1fr);
  border-top: 1px solid var(--line);
  background: #faf8f3;
}
.lf-asm .quality-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: .04em;
  text-align: center;
  opacity: 0;
  transform: translateY(4px);
  transition:
    color .35s ease,
    background-color .35s ease,
    opacity .42s ease,
    transform .55s var(--ease);
}
.lf-asm .quality-item:last-child { border-right: 0; }
.lf-asm .quality-item.shown {
  opacity: 1;
  transform: none;
}
.lf-asm .quality-item.flag-cue {
  animation: flag-cue 1.05s ease-out both;
}
.lf-asm .quality-item b { color: var(--ink); font-weight: 680; }
.lf-asm .tick { color: #4f7550; font-size: 12px; }
.lf-asm .flag { color: var(--gold-ink); font-size: 12px; }
.lf-asm .reduced-only { display: none; }
.lf-asm.demo.resetting *, .lf-asm.demo.resetting *::before, .lf-asm.demo.resetting *::after {
  animation: none !important;
  transition: none !important;
}
.lf-asm .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;
}
@keyframes land-piece {
  0% { transform: translate(var(--x), var(--y)) rotate(var(--r)) scale(var(--s)); }
  72% { transform: translate(0,-1.5px) rotate(.12deg) scale(1.004); }
  100% { transform: none; }
}
@keyframes scrap-release {
  0% {
    box-shadow: 0 8px 13px rgba(23,20,16,.18), 0 2px 3px rgba(23,20,16,.13);
    opacity: .98;
    transform: rotate(var(--chip-r)) scale(var(--chip-s));
  }
  34% {
    box-shadow: 0 10px 17px rgba(23,20,16,.22), 0 3px 5px rgba(23,20,16,.12);
    opacity: .86;
  }
  100% {
    box-shadow: 0 2px 5px rgba(23,20,16,0);
    opacity: 0;
    transform: rotate(0) scale(.985);
  }
}
@keyframes style-stamp {
  from { opacity: 0; transform: translate(7px,-50%) scale(.92); }
  to { opacity: 1; transform: translate(0,-50%) scale(1); }
}
@keyframes gallery-pulse {
  0% {
    border-color: #d5d8dd;
    background: #fff;
    box-shadow: 0 0 0 0 rgba(43,87,154,0);
    transform: scale(.985);
  }
  48% {
    border-color: var(--office-blue);
    background: #dce9fa;
    box-shadow: 0 0 0 3px rgba(43,87,154,.15);
    transform: scale(1.02);
  }
  100% {
    border-color: var(--office-blue);
    background: var(--office-blue-soft);
    box-shadow: inset 0 0 0 1px rgba(43,87,154,.15);
    transform: scale(1);
  }
}
@keyframes clause-settle {
  0% { transform: translateX(-30px) rotate(-9deg); }
  78% { transform: translateX(1px) rotate(.25deg); }
  100% { transform: none; }
}
@keyframes rule-draw {
  from { transform: scaleX(.08); }
  to { transform: scaleX(1); }
}
@keyframes node-pop {
  from { opacity: 0; transform: scale(.3); }
  72% { opacity: 1; transform: scale(1.08); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes mark-pulse {
  0%, 100% {
    background: var(--mark);
    box-shadow: inset 0 -1px rgba(138,106,42,.23), 0 0 0 0 rgba(214,168,91,0);
  }
  42% {
    background: #f0d48f;
    box-shadow: inset 0 -1px rgba(138,106,42,.23), 0 0 0 5px rgba(214,168,91,.17);
  }
}
@keyframes cursor-blink {
  0%, 48% { opacity: 1; }
  49%, 100% { opacity: 0; }
}
@keyframes flag-cue {
  0% {
    background: transparent;
    color: var(--muted);
    opacity: 0;
    transform: translateY(4px);
  }
  28%, 62% {
    background: rgba(214,168,91,.13);
    color: var(--gold-ink);
    opacity: 1;
    transform: none;
  }
  100% {
    background: transparent;
    color: var(--muted);
    opacity: 0;
    transform: none;
  }
}
@media (max-width: 620px) {
  .lf-asm .chrome { grid-template-columns: auto 1fr auto; gap: 9px; padding: 0 10px; }
  .lf-asm .address { text-align: left; }
  .lf-asm .replay .replay-word { display: none; }
  .lf-asm .workspace-bar {
    min-height: 64px;
    grid-template-columns: minmax(0,1fr) auto;
    grid-template-rows: 25px 28px;
    gap: 0 9px;
    padding: 5px 11px 6px;
  }
  .lf-asm .file-name { align-self: end; font-size: 9.5px; }
  .lf-asm .page-count { align-self: end; font-size: 9.5px; }
  .lf-asm .process-status {
    grid-column: 1 / -1;
    min-width: 0;
    font-size: 8.5px;
    letter-spacing: .08em;
  }
  .lf-asm .stage {
    min-height: 590px;
    padding: 24px 10px 22px;
  }
  .lf-asm .doc-shell {
    width: 100%;
    height: 542px;
  }
  .lf-asm .editor-titlebar { height: 28px; }
  .lf-asm .editor-file-title { font-size: 8.5px; }
  .lf-asm .window-controls i { width: 23px; font-size: 8px; }
  .lf-asm .ribbon { height: 76px; }
  .lf-asm .ribbon-tabs, .lf-asm .ribbon-tools { display: none; }
  .lf-asm .ribbon-content {
    height: 76px;
    padding: 9px 7px 7px;
  }
  .lf-asm .styles-group {
    padding: 0 0 9px;
  }
  .lf-asm .styles-gallery {
    width: 100%;
    grid-template-columns: repeat(5, minmax(0,1fr));
    gap: 3px;
  }
  .lf-asm .style-tile {
    height: 45px;
    min-width: 0;
    padding: 3px;
  }
  .lf-asm .style-tile[data-style="Title"] .style-preview { font-size: 12px; }
  .lf-asm .style-tile[data-style="Heading 1"] .style-preview { font-size: 9.5px; }
  .lf-asm .style-tile[data-style="Definition 1"] .style-preview { font-size: 8.5px; }
  .lf-asm .style-tile[data-style="Body 1"] .style-preview { font-size: 9px; }
  .lf-asm .style-tile[data-style="Footnote"] .style-preview { font-size: 7px; }
  .lf-asm .styles-caption { right: 0; left: 0; font-size: 6px; }
  .lf-asm .ruler { height: 19px; }
  .lf-asm .ruler-track {
    top: 3px;
    right: 50px;
    left: 50px;
    height: 12px;
  }
  .lf-asm .editor-canvas { height: 394px; }
  .lf-asm .editor-statusbar {
    height: 25px;
    grid-template-columns: minmax(0,1fr) auto auto;
    gap: 5px;
    padding: 0 6px;
    font-size: 6.4px;
  }
  .lf-asm .editor-flow {
    max-width: 121px;
    overflow: hidden;
    padding: 0;
    text-overflow: ellipsis;
  }
  .lf-asm .paper {
    top: 12px;
    width: calc(100% - 28px);
    height: 370px;
  }
  .lf-asm .page-inner { padding: 38px 38px 25px 47px; }
  .lf-asm .page-meta { top: 15px; left: 17px; font-size: 5.7px; }
  .lf-asm .title-piece {
    --x: -49px;
    --y: 26px;
    margin-bottom: 12px;
    font-size: 9.2px;
  }
  .lf-asm .title-piece.landed { font-size: 18px; }
  .lf-asm .heading-piece {
    --x: 47px;
    --y: -11px;
    margin-bottom: 6px;
    font-size: 7.1px;
  }
  .lf-asm .heading-piece.landed { font-size: 10.5px; }
  .lf-asm .body-piece {
    --x: -36px;
    --y: 24px;
    grid-template-columns: 17px 1fr;
    margin-bottom: 13px;
    font-size: 6.6px;
    line-height: 1.45;
  }
  .lf-asm .body-piece.landed { font-size: 7.8px; line-height: 1.45; }
  .lf-asm .second-heading {
    --x: 42px;
    --y: 13px;
  }
  .lf-asm .second-body {
    --x: -29px;
    --y: -10px;
  }
  .lf-asm .footnote-piece {
    --x: 31px;
    --y: 59px;
    right: 36px;
    bottom: 21px;
    left: 47px;
    font-size: 5.8px;
  }
  .lf-asm .footnote-piece.landed { font-size: 6.5px; }
  .lf-asm .piece::before { inset: -5px -7px -5px -7px; }
  .lf-asm .piece::after {
    right: -33px;
    padding: 4px 4px 3px;
    font-size: 7px;
    letter-spacing: .02em;
  }
  .lf-asm .outline {
    top: 43px;
    bottom: 36px;
    left: 13px;
    transform: scale(.72) translateX(-8px);
    transform-origin: top left;
  }
  .lf-asm .outline.active { transform: scale(.72); }
  .lf-asm .quality-strip { grid-template-columns: 1fr; }
  .lf-asm .quality-item {
    min-height: 36px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .lf-asm .quality-item:last-child { border-bottom: 0; }
}
@media (max-width: 390px) {
  .lf-asm .stage {
    min-height: 574px;
    padding-right: 7px;
    padding-left: 7px;
  }
  .lf-asm .doc-shell { height: 530px; }
  .lf-asm .editor-canvas { height: 382px; }
  .lf-asm .paper {
    width: calc(100% - 22px);
    height: 359px;
  }
  .lf-asm .page-inner {
    padding-right: 35px;
    padding-left: 44px;
  }
  .lf-asm .footnote-piece {
    right: 33px;
    left: 44px;
  }
  .lf-asm .piece::after { right: -31px; }
  .lf-asm .editor-statusbar {
    font-size: 5.8px;
    letter-spacing: -.01em;
  }
  .lf-asm .editor-flow { max-width: 107px; }
}
@media (prefers-reduced-motion: reduce) {
  .lf-asm, .lf-asm *, .lf-asm *::before, .lf-asm *::after {
    animation: none !important;
    transition: none !important;
  }
  .lf-asm .stage {
    background-color: #e3e5e8;
    background-image: radial-gradient(circle at 50% -30%, rgba(255,255,255,.7), transparent 50%);
  }
  .lf-asm .stage::before { opacity: 0; }
  .lf-asm .editor-window::before, .lf-asm .editor-ui, .lf-asm .editor-canvas::before {
    filter: none;
    opacity: 1;
    transform: none;
  }
  .lf-asm .paper {
    background: #fff;
    box-shadow: 0 7px 22px rgba(39,44,53,.20), 0 1px 3px rgba(39,44,53,.16);
    filter: none;
    opacity: 1;
    transform: translateX(-50%);
  }
  .lf-asm .patina, .lf-asm .page-meta, .lf-asm .motion-only { display: none; }
  .lf-asm .reduced-only { display: inline; }
  .lf-asm .replay { display: none; }
  .lf-asm .piece {
    color: var(--ink);
    filter: none;
    text-shadow: none;
    text-transform: none;
    transform: none;
  }
  .lf-asm .piece::before { display: none; }
  .lf-asm .piece::after { opacity: 1; transform: translate(0,-50%) scale(1); }
  .lf-asm .title-piece {
    font-family: var(--serif);
    font-size: 25px;
    text-align: center;
  }
  .lf-asm .heading-piece {
    font-family: var(--serif);
    font-size: 15px;
  }
  .lf-asm .body-piece {
    font-family: var(--serif);
    font-size: 11.6px;
    line-height: 1.5;
  }
  .lf-asm .footnote-piece {
    font-family: var(--serif);
    font-size: 9px;
  }
  .lf-asm .clause-no, .lf-asm .footnote-rule, .lf-asm .outline-line { transform: none; }
  .lf-asm .outline { opacity: 1; transform: none; }
  .lf-asm .node { opacity: 1; transform: scale(1); }
  .lf-asm .quality-item { opacity: 1; transform: none; }
  .lf-asm .text-cursor { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 620px) {
  .lf-asm .title-piece { font-size: 18px; }
  .lf-asm .heading-piece { font-size: 10.5px; }
  .lf-asm .body-piece { font-size: 7.8px; line-height: 1.45; }
  .lf-asm .footnote-piece { font-size: 6.5px; }
  .lf-asm .outline { transform: scale(.72); }
}
