/* Learn your handwriting: a room of its own, lit like the rest of Ditto.
   Four steps along the top; each step is one calm screen. */

.lf {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: var(--air);
  color: var(--ink);
  opacity: 0;
  transform: scale(0.992);
  transition: opacity 0.42s var(--ease), transform 0.6s var(--ease);
  isolation: isolate;
}
.lf.in {
  opacity: 1;
  transform: none;
}
.lf.leaving {
  opacity: 0;
  transform: scale(0.995);
}
.lf-light {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* a sky over the work: azure above, cloud-white where you work, a warm horizon at the foot */
  background:
    radial-gradient(60% 42% at 12% -8%, color-mix(in srgb, var(--sky-2, #6eaef0) 55%, transparent), transparent 70%),
    radial-gradient(48% 36% at 92% -4%, color-mix(in srgb, var(--lilac, #b7a6f2) 42%, transparent), transparent 72%),
    radial-gradient(70% 34% at 50% 112%, color-mix(in srgb, var(--sunrise, #ffb98c) 42%, transparent), transparent 72%),
    radial-gradient(40% 30% at 0% 104%, color-mix(in srgb, var(--rose, #f4a0b9) 32%, transparent), transparent 70%),
    linear-gradient(180deg, color-mix(in srgb, var(--sky-4, #dcebfb) 80%, var(--air)) 0%, var(--air) 34%, var(--air) 70%, color-mix(in srgb, var(--horizon, #ffe6cc) 55%, var(--air)) 100%);
}
.lf-light::before,
.lf-light::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  background: radial-gradient(closest-side, var(--cloud-lit, #fff), transparent);
  filter: blur(6px);
  opacity: 0.85;
  animation: lf-drift 46s ease-in-out infinite alternate;
}
.lf-light::before {
  top: 9%;
  left: -6%;
  width: 34vw;
  height: 9vw;
}
.lf-light::after {
  top: 3%;
  right: 4%;
  width: 26vw;
  height: 7vw;
  animation-duration: 58s;
  animation-direction: alternate-reverse;
}
@keyframes lf-drift {
  to {
    transform: translateX(6vw);
  }
}
@media (prefers-reduced-motion: reduce) {
  .lf-light::before,
  .lf-light::after {
    animation: none;
  }
}
.lf-head {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 68px;
  padding: 0 18px 0 26px;
}
.lf-title {
  font-family: var(--font-display);
  font-size: calc(19px * var(--ts, 1));
  font-weight: 420;
  white-space: nowrap;
}
.lf-steps {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0 auto;
  padding: 4px;
  list-style: none;
  border-radius: 999px;
  background: var(--veil);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lf-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px 0 6px;
  border-radius: 999px;
  font-size: calc(13px * var(--ts, 1));
  font-weight: 560;
  color: var(--ink-3);
  white-space: nowrap;
  transition: background var(--t-2), color var(--t-2);
}
.lf-steps li span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: calc(11.5px * var(--ts, 1));
  box-shadow: inset 0 0 0 1px var(--line-3);
}
.lf-steps li.on {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--sh-1);
}
.lf-steps li.on span {
  background: linear-gradient(180deg, var(--primary-top, var(--accent-hi)), var(--primary, var(--accent)));
  color: #fff;
  box-shadow: 0 2px 8px -2px var(--primary-glow, rgba(54, 110, 255, 0.5));
}
.lf-steps li.done {
  color: var(--ink-2);
}
.lf-steps li.done span {
  background: var(--good);
  color: #fff;
  box-shadow: none;
  font-size: 0;
}
.lf-steps li.done span::before {
  content: "";
  width: 10px;
  height: 6px;
  margin-top: -3px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  color: #fff;
}
.lf-x {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--veil);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  cursor: pointer;
  transition: transform var(--t-2) var(--ease), color var(--t-1);
}
.lf-x:hover {
  color: var(--ink);
  transform: rotate(90deg);
}
.lf-x svg {
  width: 16px;
  height: 16px;
}
.lf-body {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
}
.lf-view {
  max-width: 1180px;
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(20px, 4vh, 48px) clamp(18px, 4vw, 48px) 40px;
}
.lf-enter {
  animation: lf-enter 0.7s var(--ease) both;
}
@keyframes lf-enter {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
.lf-h {
  font-family: var(--font-display);
  font-size: clamp(38px, 4.4vw, 60px);
  font-weight: 350;
  line-height: 1.02;
  letter-spacing: -0.02em;
}
.lf-h.small {
  font-size: clamp(30px, 3vw, 40px);
}
.lf-sub {
  margin-top: 14px;
  max-width: 34em;
  font-size: calc(16.5px * var(--ts, 1));
  line-height: 1.6;
  color: var(--ink-2);
}
.lf-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 26px;
}
.lf-actions .grow {
  flex: 1;
}
.lf-spin {
  width: 15px;
  height: 15px;
  border-radius: 99px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: lf-spin 0.8s linear infinite;
}
@keyframes lf-spin {
  to {
    transform: rotate(360deg);
  }
}

/* 1. the pages */
.lf-pages {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(28px, 5vw, 80px);
  align-items: start;
}
.lf-pages {
  grid-template-areas: "intro work" "advice work";
  grid-template-rows: auto 1fr;
  row-gap: 0;
}
.lf-pages .lf-intro {
  grid-area: intro;
}
.lf-pages .lf-work {
  grid-area: work;
}
.lf-pages .lf-advice {
  grid-area: advice;
}
.lf-intro {
  padding-top: clamp(8px, 4vh, 44px);
}
.lf-tips {
  list-style: none;
  display: grid;
  gap: 12px;
  margin-top: 30px;
  font-size: calc(14.5px * var(--ts, 1));
  line-height: 1.5;
  color: var(--ink-2);
}
.lf-tips li {
  position: relative;
  padding-left: 24px;
}
.lf-tips li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.6em;
  width: 11px;
  height: 1.5px;
  background: var(--ink-3);
}
.lf-tips b {
  color: var(--ink);
  font-weight: 600;
}
.lf-drop {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  min-height: 300px;
  padding: 40px 28px 34px;
  border: 1.5px dashed var(--line-3);
  border-radius: 28px;
  background: var(--veil);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--ink);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--t-2), background var(--t-2), transform var(--t-2) var(--ease);
}
.lf-drop:hover,
.lf-pages.dragging .lf-drop {
  border-color: var(--ink-2);
  background: var(--veil-strong);
}
.lf-pages.dragging .lf-drop {
  transform: scale(1.01);
}
.lf-drop > b {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
}
.lf-drop > span:not(.btn):not(.lf-drop-art) {
  max-width: 26em;
  font-size: calc(14.5px * var(--ts, 1));
  color: var(--ink-3);
}
.lf-drop .btn {
  margin-top: 10px;
  pointer-events: none;
}
.lf-drop-art {
  position: relative;
  width: 120px;
  height: 92px;
  margin-bottom: 8px;
}
.lf-drop-art i {
  position: absolute;
  inset: 0;
  border-radius: 4px;
  background: #fbf7ee;
  box-shadow: var(--sh-2);
  background-image: repeating-linear-gradient(180deg, transparent 0 13px, rgba(80, 120, 190, 0.28) 13px 14px);
}
.lf-drop-art i:nth-child(1) {
  transform: rotate(-9deg) translate(-16px, 4px);
}
.lf-drop-art i:nth-child(2) {
  transform: rotate(6deg) translate(14px, 2px);
}
.lf-drop-art i:nth-child(3) {
  transform: rotate(-1deg);
  background-image:
    linear-gradient(90deg, transparent 12px, rgba(220, 80, 90, 0.35) 12px 13px, transparent 13px),
    repeating-linear-gradient(180deg, transparent 0 13px, rgba(80, 120, 190, 0.28) 13px 14px);
}
.lf-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 16px;
}
.lf-thumbs:empty {
  display: none;
}
.lf-thumb {
  position: relative;
  width: 96px;
  height: 120px;
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line), var(--sh-2);
  animation: lf-enter 0.5s var(--ease) both;
}
.lf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lf-thumb figcaption {
  position: absolute;
  left: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  background: rgba(20, 20, 24, 0.6);
  color: #fff;
  font-size: calc(11.5px * var(--ts, 1));
  font-weight: 600;
}
.lf-thumb-x {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 99px;
  display: grid;
  place-items: center;
  background: rgba(20, 20, 24, 0.6);
  color: #fff;
  cursor: pointer;
}
.lf-thumb-x svg {
  width: 12px;
  height: 12px;
}
.lf-pdf {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  height: 100%;
  padding: 8px;
  font-size: calc(11px * var(--ts, 1));
  color: var(--ink-3);
  text-align: center;
  word-break: break-all;
}
.lf-pdf svg {
  width: 26px;
  height: 26px;
}
.lf-pdf.big {
  min-height: 320px;
  border-radius: 12px;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lf-name {
  margin-top: 22px;
  max-width: 360px;
}

/* 2. what they say */
.lf-text {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  height: 100%;
}
.lf-gallery {
  position: relative;
  max-height: calc(100dvh - 140px);
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  padding: 4px;
  scrollbar-width: thin;
}
.lf-page-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  color: var(--ink-2);
  background: var(--veil-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: calc(13px * var(--ts, 1));
}
.lf-page-choice {
  min-width: 0;
  max-width: 65%;
  padding: 7px 28px 7px 10px;
  border: 0;
  border-radius: 8px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
}
.lf-page-total {
  margin-left: auto;
  color: var(--ink-3);
  white-space: nowrap;
}
.lf-pg {
  position: relative;
  margin: 0;
  width: 100%;
  align-self: flex-start;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--sh-paper);
}
.lf-pg img {
  width: 100%;
  height: auto;
  max-height: calc(100dvh - 220px);
  object-fit: contain;
  background: var(--paper);
}
.lf-hl {
  position: absolute;
  border-radius: 6px;
  background: color-mix(in srgb, var(--hl) 38%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, #e6b800 70%, transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t-2), left 0.3s var(--ease), top 0.3s var(--ease), width 0.3s var(--ease), height 0.3s var(--ease);
  mix-blend-mode: multiply;
}
.lf-hl.word {
  border-radius: 4px;
  background: color-mix(in srgb, var(--hl) 55%, transparent);
}
.lf-hl.guess {
  background: transparent;
  box-shadow: 0 0 0 2px color-mix(in srgb, #e6b800 45%, transparent);
  outline: 1px dashed color-mix(in srgb, #e6b800 70%, transparent);
}
.lf-editor {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.lf-ta-wrap {
  flex: 1;
  min-height: 300px;
  margin-top: 20px;
  border-radius: 20px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-2);
  overflow: hidden;
}
:root[data-theme="dark"] .lf-ta-wrap {
  background: var(--surface);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lf-ta-wrap {
    background: var(--surface);
  }
}
.lf-ta {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  padding: 18px 20px;
  border: 0;
  resize: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: calc(14px * var(--ts, 1));
  line-height: 2;
  color: var(--ink);
  /* one written line is one line here: no soft wrapping */
  white-space: pre;
  overflow-wrap: normal;
  overflow-x: auto;
  /* ruled like the page it describes */
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, var(--line) 27px 28px);
  background-position: 0 18px;
  background-attachment: local;
}
.lf-ta:focus {
  outline: none;
}
.lf-hint {
  margin-top: 10px;
  font-size: calc(12.5px * var(--ts, 1));
  color: var(--ink-3);
}
.lf-hint code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--surface-2);
  color: var(--ink-2);
}
.lf-count {
  font-size: calc(13px * var(--ts, 1));
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* 3. learning */
.lf-learning {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}
.lf-stage-l {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
  align-items: start;
}
.lf-scan {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--sh-paper);
  transform: rotate(-1.6deg);
}
.lf-scan img {
  width: 100%;
  height: auto;
  filter: saturate(0.9);
}
.lf-scanline {
  position: absolute;
  left: 0;
  right: 0;
  top: -16%;
  height: 16%;
  background: linear-gradient(180deg, transparent, color-mix(in srgb, var(--gold-hi, #f0c66e) 30%, transparent) 85%, color-mix(in srgb, var(--gold-hi, #f0c66e) 62%, transparent));
  border-bottom: 2px solid color-mix(in srgb, var(--gold, #d6a448) 90%, transparent);
  box-shadow: 0 8px 22px -6px color-mix(in srgb, var(--gold, #d6a448) 60%, transparent);
  animation: lf-scan 3.2s var(--ease-io) infinite;
}
@keyframes lf-scan {
  to {
    transform: translateY(720%);
  }
}
.lf-found {
  min-height: 200px;
  padding: 14px;
  border-radius: 20px;
  background: var(--veil);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lf-found-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
  font-size: calc(13px * var(--ts, 1));
  color: var(--ink-3);
}
.lf-found-head b {
  color: var(--ink);
  font-weight: 600;
}
.lf-spec {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: 6px;
}
.lf-cell {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line), var(--sh-1);
  display: grid;
  place-items: center;
  animation: lf-cell 0.6s var(--ease) both;
  animation-delay: var(--d, 0ms);
}
:root[data-theme="dark"] .lf-cell {
  background: var(--surface-2);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lf-cell {
    background: var(--surface-2);
  }
}
@keyframes lf-cell {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.7) rotate(-6deg);
  }
}
.lf-cell canvas {
  width: 88%;
  height: 88%;
}
.lf-cell i {
  position: absolute;
  left: 5px;
  top: 3px;
  font-style: normal;
  font-size: calc(9.5px * var(--ts, 1));
  font-weight: 600;
  color: var(--ink-4);
}
.lf-cell em {
  position: absolute;
  right: 4px;
  bottom: 2px;
  font-style: normal;
  font-size: calc(9.5px * var(--ts, 1));
  font-weight: 600;
  color: var(--ink-3);
}
.lf-msg {
  margin-top: 12px;
  min-height: 3.2em;
  font-size: calc(15.5px * var(--ts, 1));
  line-height: 1.55;
  color: var(--ink-2);
}
.lf-msg.err {
  color: var(--bad);
}
.lf-progress {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
}
.lf-bar {
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: var(--line-2);
  overflow: hidden;
}
.lf-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
  transition: width 0.7s var(--ease);
}
.lf-pct {
  min-width: 3em;
  text-align: right;
  font-family: var(--font-display);
  font-size: calc(16px * var(--ts, 1));
  font-variant-numeric: tabular-nums;
}
.lf-stages {
  list-style: none;
  display: grid;
  gap: 4px;
  margin-top: 24px;
}
.lf-stages li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 12px;
  border-radius: 14px;
  color: var(--ink-3);
  transition: background var(--t-3), color var(--t-3);
}
.lf-stages li i {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1.5px var(--line-3);
}
.lf-stages li b {
  display: block;
  font-size: calc(14.5px * var(--ts, 1));
  font-weight: 600;
}
.lf-stages li span {
  font-size: calc(13px * var(--ts, 1));
}
.lf-stages li.on {
  background: var(--veil-strong);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lf-stages li.on i {
  border: 2px solid var(--ink);
  border-right-color: transparent;
  box-shadow: none;
  animation: lf-spin 0.9s linear infinite;
}
.lf-stages li.done {
  color: var(--ink-2);
}
.lf-stages li.done i {
  background: var(--good) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4L18 8' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat;
  box-shadow: none;
}

/* 4. your hand */
.lf-result {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(100% - 20px);
}
.lf-compare {
  display: grid;
  gap: 12px;
  margin-top: 28px;
  padding: 18px;
  border-radius: 22px;
  background: var(--veil-strong);
  box-shadow: inset 0 0 0 1px var(--line), var(--sh-2);
}
.lf-cmp-row {
  display: grid;
  gap: 6px;
}
.lf-cmp-k {
  font-size: calc(12.5px * var(--ts, 1));
  font-weight: 600;
  color: var(--ink-3);
}
.lf-cmp-v {
  min-height: 46px;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 8px 12px;
  border-radius: 12px;
  background: #fdfcf8;
  box-shadow: inset 0 0 0 1px rgba(25, 29, 41, 0.06);
}
.lf-cmp-v canvas {
  max-width: 100%;
  height: auto;
}
.lf-sample-sheet {
  width: 100%;
  aspect-ratio: 148 / 120;
  background: #fbf7ee;
  border-radius: 2px;
  box-shadow: var(--sh-paper);
  transform: rotate(1.6deg);
}
.lf-sample-sheet canvas {
  width: 100%;
  height: 100%;
}

/* no service */
.lf-offline {
  max-width: 720px;
  padding-top: clamp(40px, 10vh, 120px);
}

@media (max-width: 900px) {
  .lf-head {
    padding: 0 12px 0 16px;
  }
  .lf-title {
    display: none;
  }
  .lf-steps li {
    padding: 0 6px;
    font-size: 0;
    gap: 0;
  }
  .lf-steps li.on {
    font-size: calc(12.5px * var(--ts, 1));
    gap: 8px;
    padding-right: 12px;
  }
  .lf-pages,
  .lf-text,
  .lf-learning,
  .lf-result,
  .lf-stage-l {
    grid-template-columns: 1fr;
  }
  .lf-gallery {
    max-height: 42vh;
  }
}
/* letters found on the photo, marked where they sit */
.lf-marks {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.lf-marks i {
  position: absolute;
  border-radius: 2px;
  background: color-mix(in srgb, var(--gold-hi, #f0c66e) 22%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--gold, #d6a448) 70%, transparent);
  animation: lf-mark 1.4s var(--ease) both;
  animation-delay: var(--d, 0ms);
}
@keyframes lf-mark {
  0% {
    opacity: 0;
    transform: scale(1.8);
  }
  30% {
    opacity: 1;
    transform: none;
  }
  100% {
    opacity: 0.55;
  }
}

/* lines the reader was least sure of */
.lf-ta-wrap {
  position: relative;
}
.lf-ta {
  padding-left: 34px;
}
.lf-gutter {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 30px;
  pointer-events: none;
  overflow: hidden;
}
.lf-gutter i {
  position: absolute;
  left: 13px;
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent);
}
.lf-unsure {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: calc(13.5px * var(--ts, 1));
  color: var(--ink-2);
}
.lf-unsure i {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: 99px;
  background: var(--warn);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--warn) 22%, transparent);
}
.lf-unsure + .lf-ta-wrap {
  margin-top: 10px;
}
.lf-eta {
  display: block;
  min-height: 1.4em;
  margin-top: 8px;
  font-size: calc(13px * var(--ts, 1));
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}
.lf-warn {
  list-style: none;
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--warn) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--warn) 30%, transparent);
  font-size: calc(13.5px * var(--ts, 1));
  color: var(--ink-2);
}

/* ---------------------------------------------------------------- 1. adding pages */
.lf-srcs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.lf-src {
  position: relative;
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 210px;
  padding: 24px 22px 22px;
  border: 0;
  border-radius: 26px;
  text-align: left;
  color: var(--ink);
  background: var(--veil-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line), var(--sh-2);
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.5s var(--ease), box-shadow var(--t-2);
}
.lf-src::before {
  content: "";
  position: absolute;
  inset: auto -20% -55% -20%;
  height: 80%;
  z-index: -1;
  border-radius: 50%;
  opacity: 0.55;
  transition: opacity var(--t-2), transform 0.6s var(--ease);
}
.lf-src-cam::before {
  background: radial-gradient(closest-side, var(--sunrise, #ffb98c), color-mix(in srgb, var(--rose, #f4a0b9) 60%, transparent) 60%, transparent);
}
.lf-src-file::before {
  background: radial-gradient(closest-side, var(--sky-2, #6eaef0), color-mix(in srgb, var(--lilac, #b7a6f2) 60%, transparent) 60%, transparent);
}
.lf-src:hover {
  transform: translateY(-3px);
  box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-3);
}
.lf-src:hover::before {
  opacity: 0.85;
  transform: translateY(-8%);
}
.lf-src:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.lf-src b {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 400;
  line-height: 1.1;
}
.lf-src > span:not(.lf-src-ico) {
  font-size: calc(14px * var(--ts, 1));
  line-height: 1.5;
  color: var(--ink-2);
}
.lf-src-ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(160deg, var(--primary-top, #5b8dff), var(--primary, #2a62f2));
  box-shadow: 0 8px 20px -8px var(--primary-glow, rgba(54, 110, 255, 0.55)), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.lf-src-cam .lf-src-ico {
  background: linear-gradient(160deg, var(--sunrise, #f4b46c), var(--rose, #e8a9bf));
  box-shadow: 0 8px 20px -8px color-mix(in srgb, var(--rose, #e8a9bf) 60%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.lf-src-ico svg {
  width: 24px;
  height: 24px;
}
.lf-drop-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: calc(13px * var(--ts, 1));
  color: var(--ink-3);
}
.lf-drop-hint .ico {
  width: 16px;
  height: 16px;
}
.lf-pages.dragging .lf-work {
  outline: 2px dashed var(--accent);
  outline-offset: 10px;
  border-radius: 28px;
}
.lf-thumb[data-level="bad"] {
  box-shadow: inset 0 0 0 2px var(--bad), var(--sh-2);
}
.lf-thumb[data-level="warn"] {
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--warn) 70%, transparent), var(--sh-2);
}
.lf-q {
  position: absolute;
  right: 6px;
  bottom: 6px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 99px;
  font-size: calc(13px * var(--ts, 1));
  font-weight: 800;
  color: #fff;
  background: rgba(20, 20, 24, 0.55);
}
.lf-q svg {
  width: 13px;
  height: 13px;
}
.lf-q .lf-spin {
  width: 11px;
  height: 11px;
  border-width: 1.5px;
}
.lf-thumb[data-level="ok"] .lf-q {
  background: var(--good);
}
.lf-thumb[data-level="warn"] .lf-q {
  background: var(--warn);
}
.lf-thumb[data-level="bad"] .lf-q {
  background: var(--bad);
}
.lf-summary {
  margin-top: 12px;
  min-height: 1.4em;
  font-size: calc(14px * var(--ts, 1));
  font-weight: 560;
  color: var(--good);
}
.lf-summary[data-level="bad"] {
  color: var(--bad);
}
.lf-summary:empty {
  display: none;
}
.lf-howmuch {
  margin-top: 26px;
  padding: 18px 20px;
  border-radius: 20px;
  background: var(--veil);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lf-howmuch > b {
  font-size: calc(13.5px * var(--ts, 1));
  font-weight: 650;
}
.lf-ladder {
  list-style: none;
  display: grid;
  gap: 9px;
  margin-top: 12px;
  font-size: calc(14px * var(--ts, 1));
  color: var(--ink-3);
}
.lf-ladder li {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}
.lf-ladder li b {
  color: var(--ink);
  font-weight: 600;
}
.lf-ladder i {
  flex: none;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--sky-2, #6eaef0), var(--primary, #2a62f2));
}
.lf-ladder li[data-tier="1"] i {
  width: 14px;
  opacity: 0.45;
}
.lf-ladder li[data-tier="2"] i {
  width: 28px;
  opacity: 0.65;
}
.lf-ladder li[data-tier="3"] i {
  width: 42px;
  opacity: 0.85;
}
.lf-ladder li[data-tier="4"] i {
  width: 56px;
  background: linear-gradient(90deg, var(--sunrise, #ffb98c), var(--rose, #f4a0b9), var(--primary, #2a62f2));
}

/* ---------------------------------------------------------------- 2. check */
.lf-check-head {
  max-width: 760px;
}
.lf-checks {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 500px), 1fr));
  gap: 16px;
  margin-top: 28px;
}
.lf-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 18px;
  padding: 14px;
  border-radius: 24px;
  background: var(--veil-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: inset 0 0 0 1px var(--line), var(--sh-2);
  animation: lf-enter 0.6s var(--ease) both;
}
.lf-card[data-level="bad"] {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 60%, transparent), var(--sh-2);
  background: color-mix(in srgb, var(--bad) 5%, var(--veil-strong));
}
.lf-card-img {
  position: relative;
  margin: 0;
  height: 190px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
}
.lf-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.lf-card-img figcaption {
  position: absolute;
  left: 8px;
  top: 8px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 99px;
  background: rgba(20, 20, 24, 0.6);
  color: #fff;
  font-size: calc(12px * var(--ts, 1));
  font-weight: 650;
}
.lf-card-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 4px 4px 2px 0;
}
.lf-card-verdict {
  display: flex;
  align-items: center;
  gap: 10px;
}
.lf-card-src {
  font-size: calc(12.5px * var(--ts, 1));
  color: var(--ink-3);
}
.lf-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 11px;
  border-radius: 99px;
  font-size: calc(12.5px * var(--ts, 1));
  font-weight: 650;
  color: var(--ink-2);
  background: var(--surface-2);
}
.lf-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: currentColor;
}
.lf-pill[data-level="ok"] {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 12%, transparent);
}
.lf-pill[data-level="warn"] {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 13%, transparent);
}
.lf-pill[data-level="bad"] {
  color: var(--bad);
  background: color-mix(in srgb, var(--bad) 12%, transparent);
}
.lf-issues {
  list-style: none;
  display: grid;
  gap: 6px;
  font-size: calc(14px * var(--ts, 1));
  line-height: 1.45;
  color: var(--ink-2);
}
.lf-issues b {
  color: var(--ink);
  font-weight: 650;
}
.lf-issues li[data-level="bad"] b {
  color: var(--bad);
}
.lf-fine {
  font-size: calc(14px * var(--ts, 1));
  color: var(--ink-2);
}
.lf-facts {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: calc(12.5px * var(--ts, 1));
  color: var(--ink-3);
}
.lf-facts li {
  display: flex;
  gap: 5px;
}
.lf-facts b {
  color: var(--ink-2);
  font-weight: 600;
}
.lf-card-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: auto;
}
.lf-anyway {
  margin-left: 4px;
  font-size: calc(12.5px * var(--ts, 1));
  color: var(--ink-3);
  text-decoration: underline;
  text-underline-offset: 3px;
  background: none;
  border: 0;
  cursor: pointer;
}
.lf-blocker {
  margin-top: 20px;
  font-size: calc(14px * var(--ts, 1));
  font-weight: 560;
  color: var(--bad);
}

/* ---------------------------------------------------------------- 3. how much writing */
.lf-cov {
  margin-top: 14px;
  padding: 16px 18px;
  border-radius: 18px;
  background: var(--veil-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: calc(14px * var(--ts, 1));
  line-height: 1.5;
  color: var(--ink-2);
}
.lf-cov-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.lf-cov-top b {
  font-size: calc(15px * var(--ts, 1));
  font-weight: 680;
  color: var(--ink);
}
.lf-cov-meter {
  display: flex;
  gap: 4px;
}
.lf-cov-meter i {
  width: 20px;
  height: 7px;
  border-radius: 99px;
  background: var(--line-2);
  transition: background 0.4s var(--ease);
}
[data-tier="1"] .lf-cov-meter i:nth-child(-n + 1),
[data-tier="2"] .lf-cov-meter i:nth-child(-n + 2),
[data-tier="3"] .lf-cov-meter i:nth-child(-n + 3),
[data-tier="4"] .lf-cov-meter i {
  background: linear-gradient(90deg, var(--sky-2, #6eaef0), var(--primary, #2a62f2));
}
[data-tier="1"] .lf-cov-meter i:first-child {
  background: var(--bad);
}
[data-tier="2"] .lf-cov-meter i:nth-child(-n + 2) {
  background: var(--warn);
}
[data-tier="4"] .lf-cov-meter i {
  background: linear-gradient(90deg, var(--sunrise, #ffb98c), var(--rose, #f4a0b9), var(--primary, #2a62f2));
}
.lf-cov[data-tier="0"] {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--bad) 55%, transparent);
}
.lf-cov[data-tier="1"] {
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 55%, transparent);
}
.lf-abc {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin: 10px 0 4px;
}
.lf-abc span {
  display: grid;
  place-items: center;
  width: 22px;
  height: 24px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: calc(12.5px * var(--ts, 1));
}
.lf-abc .yes {
  color: var(--good);
  background: color-mix(in srgb, var(--good) 11%, transparent);
}
.lf-abc .thin {
  color: var(--warn);
  background: color-mix(in srgb, var(--warn) 12%, transparent);
}
.lf-abc .no {
  color: var(--ink-4);
  box-shadow: inset 0 0 0 1px var(--line-2);
  text-decoration: line-through;
}
.lf-cov-miss {
  font-size: calc(13px * var(--ts, 1));
  color: var(--ink-3);
}
.lf-cov-add {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  font-size: calc(13px * var(--ts, 1));
}
.lf-cov-add q {
  quotes: none;
  padding: 7px 11px;
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: calc(16px * var(--ts, 1));
  color: var(--ink);
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lf-honest {
  margin-top: 20px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--veil-strong);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: calc(14px * var(--ts, 1));
  line-height: 1.5;
  color: var(--ink-2);
}
.lf-honest ul {
  display: grid;
  gap: 4px;
  padding-left: 18px;
}
.lf-honest-more {
  margin-top: 6px;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- the camera */
.cam {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #05070d;
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}
.cam.in {
  opacity: 1;
}
.cam-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 58px;
  padding: 0 14px 0 22px;
  font-size: calc(15px * var(--ts, 1));
}
.cam-x {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 99px;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
}
.cam-x svg {
  width: 16px;
  height: 16px;
}
.cam-view {
  position: relative;
  min-height: 0;
  overflow: hidden;
  display: grid;
  place-items: center;
}
.cam-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}
/* the page's outline: line the sheet up inside the corners */
.cam-guide {
  position: absolute;
  top: 7%;
  bottom: 7%;
  left: 50%;
  aspect-ratio: 0.72;
  max-width: 90%;
  transform: translateX(-50%);
  pointer-events: none;
}
.cam-guide i {
  position: absolute;
  width: 34px;
  height: 34px;
  border: 3px solid rgba(255, 255, 255, 0.9);
  filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.5));
}
.cam-guide i:nth-child(1) {
  left: 0;
  top: 0;
  border-right: 0;
  border-bottom: 0;
  border-top-left-radius: 14px;
}
.cam-guide i:nth-child(2) {
  right: 0;
  top: 0;
  border-left: 0;
  border-bottom: 0;
  border-top-right-radius: 14px;
}
.cam-guide i:nth-child(3) {
  left: 0;
  bottom: 0;
  border-right: 0;
  border-top: 0;
  border-bottom-left-radius: 14px;
}
.cam-guide i:nth-child(4) {
  right: 0;
  bottom: 0;
  border-left: 0;
  border-top: 0;
  border-bottom-right-radius: 14px;
}
.cam-flash {
  position: absolute;
  inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.cam-flash.go {
  animation: cam-flash 0.45s ease-out;
}
@keyframes cam-flash {
  from {
    opacity: 0.85;
  }
}
.cam-focus {
  position: absolute;
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  border: 2px solid var(--hl, #ffe37a);
  border-radius: 14px;
  pointer-events: none;
  animation: cam-focus 0.9s var(--ease) both;
}
@keyframes cam-focus {
  from {
    transform: scale(1.5);
    opacity: 0;
  }
  30% {
    transform: none;
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}
.cam-panel {
  display: grid;
  gap: 10px;
  padding: 14px 18px calc(16px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(5, 7, 13, 0), #05070d 30%);
}
.cam-meters {
  display: flex;
  justify-content: center;
  gap: 18px;
}
.cam-meter {
  display: grid;
  gap: 5px;
  width: 92px;
  font-size: calc(11.5px * var(--ts, 1));
  color: rgba(255, 255, 255, 0.72);
}
.cam-meter b {
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}
.cam-meter b i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #ff7a7a;
  transition: width 0.4s var(--ease), background 0.4s;
}
.cam-meter[data-level="warn"] b i {
  background: #ffc86b;
}
.cam-meter[data-level="ok"] b i {
  background: #6fe0a5;
}
.cam-tip {
  min-height: 1.4em;
  text-align: center;
  font-size: calc(14.5px * var(--ts, 1));
  font-weight: 560;
}
.cam-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
}
.cam-shots {
  display: flex;
  gap: 6px;
  overflow: hidden;
}
.cam-shot {
  position: relative;
  flex: none;
  width: 40px;
  height: 52px;
  border-radius: 7px;
  overflow: hidden;
  box-shadow: 0 0 0 2px #6fe0a5;
  animation: lf-enter 0.4s var(--ease) both;
}
.cam-shot[data-level="warn"] {
  box-shadow: 0 0 0 2px #ffc86b;
}
.cam-shot[data-level="bad"] {
  box-shadow: 0 0 0 2px #ff7a7a;
}
.cam-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cam-shutter {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border: 0;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 4px #fff;
  cursor: pointer;
}
.cam-shutter i {
  width: 56px;
  height: 56px;
  border-radius: 99px;
  background: #fff;
  transition: transform 0.2s var(--ease), background 0.3s;
}
.cam-shutter:active i {
  transform: scale(0.88);
}
.cam-shutter.ready {
  box-shadow: inset 0 0 0 4px #6fe0a5, 0 0 24px rgba(111, 224, 165, 0.45);
}
.cam-shutter:disabled {
  opacity: 0.5;
}
.cam-done {
  justify-self: end;
  height: 42px;
  padding: 0 18px;
  border: 0;
  border-radius: 99px;
  font-weight: 650;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}
.cam-done.primary {
  background: linear-gradient(180deg, var(--primary-top, #5b8dff), var(--primary, #2a62f2));
}
.cam-review {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 7, 13, 0.82);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.cam-review[hidden] {
  display: none;
}
.cam-review > img {
  position: absolute;
  inset: 8%;
  width: 84%;
  height: 84%;
  object-fit: contain;
  opacity: 0.28;
  filter: blur(1px);
}
.cam-review-card {
  position: relative;
  max-width: 400px;
  padding: 22px 22px 18px;
  border-radius: 22px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}
.cam-review-card > b {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 400;
  color: var(--bad);
}
.cam-review-card p {
  margin-top: 8px;
  font-size: calc(14.5px * var(--ts, 1));
  line-height: 1.5;
  color: var(--ink-2);
}
.cam-review-card .cam-more {
  font-size: calc(13px * var(--ts, 1));
  color: var(--ink-3);
}
.cam-review-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .lf-checks {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .lf-srcs {
    grid-template-columns: 1fr;
  }
  .lf-src {
    min-height: 0;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    padding: 16px;
  }
  .lf-src b {
    margin-top: 0;
    align-self: center;
    font-size: calc(21px * var(--ts, 1));
  }
  .lf-src > span:not(.lf-src-ico) {
    grid-column: 1 / -1;
  }
  .lf-card {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 12px;
  }
  .lf-card-img {
    height: 128px;
  }
  .lf-actions {
    flex-wrap: wrap;
  }
  .cam-meters {
    gap: 10px;
  }
  .cam-meter {
    width: 78px;
  }
}
@media (max-width: 900px) {
  /* on a phone: what this is, the ways in, then the advice */
  .lf-pages {
    grid-template-areas: "intro" "work" "advice";
  }
  .lf-pages .lf-intro {
    padding-top: 0;
  }
}
@media (max-width: 560px) {
  .lf-card {
    grid-template-columns: 1fr;
  }
  .lf-card-img {
    height: 150px;
  }
  .lf-card-img img {
    object-position: top;
  }
}
@media (max-width: 900px) {
  .lf-pages .lf-work {
    margin-top: 24px;
  }
  .lf-pages .lf-advice {
    margin-top: 8px;
  }
}
.lf-bar i {
  background: linear-gradient(90deg, var(--sky-2, #6eaef0), var(--primary, #2a62f2) 60%, var(--rose, #f4a0b9));
  box-shadow: 0 0 12px -2px var(--primary-glow, rgba(54, 110, 255, 0.5));
}

/* ---------------------------------------------------------------- a notes app's page, screenshotted */
.lf-digital-slot:empty {
  display: none;
}
.lf-digital {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--accent) 7%, var(--veil-strong));
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--accent) 35%, transparent), var(--sh-2);
  font-size: calc(14px * var(--ts, 1));
  line-height: 1.5;
  color: var(--ink-2);
  animation: lf-enter 0.5s var(--ease) both;
}
.lf-check .lf-digital {
  margin: 22px 0 0;
  max-width: 820px;
}
.lf-digital b {
  font-size: calc(15.5px * var(--ts, 1));
  font-weight: 680;
  color: var(--ink);
}
.lf-digital p {
  margin-top: 4px;
}
.lf-digital-why {
  color: var(--bad);
  font-weight: 560;
}
.lf-digital-acts {
  margin-top: 10px;
}
.lf-digital-ico {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 13%, transparent);
}
.lf-digital-ico svg {
  width: 20px;
  height: 20px;
}
.lf-issues li[data-level="tip"] b {
  color: var(--accent);
}

/* ---------------------------------------------------------------- words to check */
.lf-flaghead {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--hl) 22%, var(--veil-strong));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, #d9a800 40%, transparent);
  font-size: calc(13.5px * var(--ts, 1));
  line-height: 1.45;
  color: var(--ink-2);
}
.lf-flaghead[hidden] {
  display: none;
}
.lf-flaghead[data-done="1"] {
  background: color-mix(in srgb, var(--good) 9%, var(--veil-strong));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--good) 35%, transparent);
}
.lf-flaghead b {
  display: block;
  font-size: calc(14.5px * var(--ts, 1));
  color: var(--ink);
}
.lf-flag-n {
  display: grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 99px;
  font-weight: 750;
  color: #6b4d00;
  background: var(--hl);
}
.lf-flag-n[data-done="1"] {
  color: #fff;
  background: var(--good);
}
.lf-flag-n svg {
  width: 16px;
  height: 16px;
}
.lf-flaghead + .lf-ta-wrap {
  margin-top: 10px;
}
.lf-ta-wrap .lf-ta {
  position: relative;
  z-index: 1;
}
.lf-ta-wrap .lf-gutter {
  z-index: 2;
}
.lf-ta-mirror {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.lf-ta-mirror-in {
  width: max-content;
  min-width: 100%;
  padding: 18px 20px 18px 34px;
  font-family: var(--font-mono);
  font-size: calc(14px * var(--ts, 1));
  line-height: 2;
  white-space: pre;
  color: transparent;
}
.lf-mrow {
  height: 28px;
}
.lf-mrow.todo {
  background: color-mix(in srgb, var(--hl) 16%, transparent);
}
.lf-mrow mark {
  color: transparent;
  border-radius: 4px;
  background: color-mix(in srgb, var(--hl) 85%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--hl) 85%, transparent), inset 0 -2px 0 #d9a800;
}
.lf-mrow.seen mark {
  background: color-mix(in srgb, var(--good) 16%, transparent);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--good) 60%, transparent);
}
.lf-gutter i.seen {
  background: var(--good);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--good) 22%, transparent);
}
.lf-checkbar {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: calc(13px * var(--ts, 1));
  color: var(--ink-2);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-2), var(--sh-2);
}
.lf-checkbar[hidden] {
  display: none;
}
.lf-review-toggle {
  align-self: flex-start;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-2);
  background: var(--surface);
  font: inherit;
  font-size: calc(12.5px * var(--ts, 1));
  cursor: pointer;
}
.lf-review-toggle:hover {
  color: var(--ink);
  border-color: var(--line-3);
}
.lf-review-details[hidden] {
  display: none;
}
.lf-checkbar b {
  color: var(--ink);
}
.lf-cw mark {
  padding: 0 4px;
  border-radius: 4px;
  font-family: var(--font-mono);
  background: var(--hl);
  color: #3a2a00;
}
.lf-cw em {
  font-style: normal;
  color: var(--ink-3);
}
@media (max-width: 560px) {
  .lf-flaghead {
    grid-template-columns: auto minmax(0, 1fr);
  }
  .lf-flaghead .btn {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
.lf-text .lf-checkbar {
  position: static;
  margin-top: 8px;
}

/* Reading progress */
.lf-reader {
  display: grid;
  place-items: center;
}
.lf-reader-card {
  width: min(620px, 100%);
  padding: clamp(24px, 5vw, 48px);
  border-radius: 24px;
  background: var(--veil-strong);
  box-shadow: var(--sh-2), inset 0 0 0 1px var(--line);
}
.lf-reader-card .lf-h {
  margin: 8px 0 10px;
}
.lf-reader-message {
  min-height: 24px;
  margin: 0 0 20px;
  color: var(--ink-2);
}
.lf-reader-track {
  height: 10px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}
.lf-reader-bar {
  width: 100%;
  height: 100%;
}
.lf-reader-bar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-hi, #a98cf7), var(--primary, #343b82));
  transition: width 220ms ease;
}
.lf-reader-status {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--ink-3);
  font-size: calc(12.5px * var(--ts, 1));
  font-variant-numeric: tabular-nums;
}
.lf-reader-pct {
  color: var(--ink-2);
  font-weight: 650;
}
.lf-reader-detail {
  margin: 0;
  text-align: right;
}
.lf-reader-card .lf-actions {
  justify-content: flex-end;
  margin-top: 24px;
}

/* (the night atelier, the flow's old navy room, is gone: the first run sits on the cloud sea, firstrun.css) */

/* each learning step: how long it took, or is expected to take */
.lf-stages li {
  grid-template-columns: 22px 1fr auto;
}
.lf-stage-t {
  align-self: center;
  font-style: normal;
  font-size: calc(12.5px * var(--ts, 1));
  font-variant-numeric: tabular-nums;
  color: var(--ink-3);
  white-space: nowrap;
}
.lf-stages li.on .lf-stage-t {
  color: var(--ink-2);
}
.lf-stages li.skip {
  opacity: 0.55;
}
.lf-stages li.skip b {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.lf-step-eta {
  margin-left: 2px;
  padding: 1px 7px;
  border-radius: 99px;
  font-size: calc(11px * var(--ts, 1));
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--ink-2);
  background: var(--line);
}
.lf-step-eta:empty {
  display: none;
}

/* on a phone, how far along it is comes first; the photo and the letters found follow, smaller */
@media (max-width: 900px) {
  /* the heading, the bar and the time left lead; the photo follows; the list of steps last */
  .lf-learning { row-gap: 12px; }
  .lf-learning .lf-stage-r { display: contents; }
  .lf-learning .lf-stage-r > * { order: 0; margin-top: 0; }
  .lf-learning .lf-stage-l { order: 1; margin-top: 10px; }
  .lf-learning .lf-stages { order: 2; }
  .lf-learning .lf-actions { order: 3; }
  .lf-learning .lf-scan { max-height: 46vh; }
  .lf-learning .lf-scan img { max-height: 46vh; object-fit: contain; }
}

/* ------------------------------------------------------------------ pass 2 polish */
/* the step you're on, in words, under the bar (phones only; the desktop rail has its labels) */
.fr-stepname {
  display: none;
  margin: 2px 0 0;
  text-align: center;
  font-size: calc(13px * var(--ts, 1));
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink-2);
}
.fr-num-label {
  font-size: calc(13.5px * var(--ts, 1));
}
.fr-nums li.on .fr-num-label {
  color: var(--ink);
  font-weight: 650;
}
@media (max-width: 760px) {
  .fr-stepname {
    display: block;
  }
  .fr-snd {
    display: none;
  }
}
.s2-works li span {
  font-size: calc(13px * var(--ts, 1));
}
/* a phone has no drag and drop: the empty tray is the place, and the buttons are the way in */
.s2-drop.s2-drop-touch {
  display: none;
}
/* the words to check: always ink on paper, in both themes */
.lf-ta-wrap,
:root[data-theme="dark"] .lf-ta-wrap {
  background: #fbf8f1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lf-ta-wrap {
    background: #fbf8f1;
  }
}
.lf-ta {
  color: #1d1b26;
  caret-color: #1d1b26;
  background-image: repeating-linear-gradient(180deg, transparent 0 27px, rgba(60, 70, 120, 0.16) 27px 28px);
}
.lf-ta-wrap .lf-gutter {
  color: #6b6680;
}
.lf-cov-add q,
:root[data-theme="dark"] .lf-cov-add q {
  color: #1d1b26;
  background: #fbf8f1;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .lf-cov-add q {
    color: #1d1b26;
    background: #fbf8f1;
  }
}
@media (max-width: 760px) {
  /* the words first; the page a strip under them that opens on a tap */
  .s4-split {
    display: flex;
    flex-direction: column;
  }
  .s4-split .s4-editor {
    order: -1;
  }
  .s4-page {
    position: relative;
    cursor: zoom-in;
  }
  .s4-page:not(.expanded) .lf-gallery {
    max-height: 150px;
    overflow: hidden;
  }
  .s4-page:not(.expanded)::after {
    content: "Tap to see the whole page";
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: calc(12.5px * var(--ts, 1));
    font-weight: 600;
    color: #fff;
    background: rgba(20, 18, 40, 0.62);
  }
  .s4-page.expanded {
    cursor: zoom-out;
  }
  .s4-page.expanded .lf-gallery {
    max-height: none;
  }
}
/* in line: nothing lit yet, but the letter tiles breathe so the wait reads as alive */
.queued .s5-cell {
  animation: fr-queue-breathe 2.4s ease-in-out infinite;
}
.queued .s5-cell:nth-child(3n + 1) {
  animation-delay: 0.4s;
}
.queued .s5-cell:nth-child(3n + 2) {
  animation-delay: 0.8s;
}
@keyframes fr-queue-breathe {
  50% {
    opacity: 0.45;
  }
}
@media (prefers-reduced-motion: reduce) {
  .queued .s5-cell {
    animation: none;
  }
}
