/* How we start: the analysis. One idea: a messy day of work becomes one clear written sheet.
   The hero plays it once by CSS only; the map is drawn by the kit. Motion is written only inside no-preference media queries,
   so with reduced motion or no script everything stands finished. Animates transform, opacity and stroke only. */

.ana-grey { color: var(--ink-2); }
.ana-label { display: block; font: 500 11px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }

/* ---------------------------------------------------------------- hero: loose notes, one sheet */
.ana-hero { isolation: isolate; }
.ana-hero .kit-hero-wash { height: 100%; background: radial-gradient(46% 56% at 72% 54%, color-mix(in srgb, var(--kit-accent) 15%, transparent), transparent 74%); }
.ana-hero .kit-scribble > svg { bottom: -.08em; }
.ana-hero .kit-lead { margin-top: 38px; }
.ana-hero .kit-hero-actions { margin-top: 32px; }

.ana-stage { position: relative; width: 100%; max-width: 680px; height: 520px; margin-left: auto; }
.ana-hero { padding-bottom: 112px; }
.ana-scraps { position: absolute; inset: 0; z-index: 1; }
.ana-stage-sample { position: absolute; left: 0; top: 0; z-index: 3; }
.ana-scrap { position: absolute; width: 190px; padding: 14px 16px; border-radius: 12px; background: #fff; text-align: left;
  box-shadow: 0 0 0 1px var(--kit-line), 0 14px 28px -14px rgb(16 24 40 / 26%); transform: rotate(var(--r, 0deg)); }
.ana-scrap p { margin: 0; }
.ana-s1 { left: 0; top: 40px; }
.ana-s2 { left: 8px; top: 150px; width: 190px; }
.ana-s3 { left: 0; top: 270px; width: 170px; background: #fbf8f1 repeating-linear-gradient(transparent 0 25px, rgb(60 90 160 / 14%) 25px 26px); padding-top: 12px; }
.ana-s4 { left: 26px; top: 386px; width: 124px; background: #fff3c4; }
.ana-wa-head { display: flex; align-items: center; gap: 8px; font: 500 13px/1 var(--font-text); color: var(--ink); }
.ana-wa-head b { font-weight: 500; }
.ana-s1 p { margin-top: 10px; padding: 9px 12px; border-radius: 4px 14px 14px 14px; background: #e7f6dd; font: 400 14px/20px var(--font-text); color: #1d1d1f; }
.ana-sheet-grid { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; border: 1px solid #d7dbe0; border-bottom: 0; border-right: 0; }
.ana-sheet-grid i { font: 400 11px/1 var(--mono); font-style: normal; color: #4a4a50; padding: 7px 6px; border-bottom: 1px solid #d7dbe0; border-right: 1px solid #d7dbe0; white-space: nowrap; overflow: hidden; }
.ana-sheet-grid i:nth-child(-n+3) { background: #eef6ef; }
.ana-hand { font: italic 400 19px/26px var(--font-display); color: #2d2d33; }
.ana-s4 .ana-hand { font-size: 18px; line-height: 23px; }

.ana-sheet-wrap { position: absolute; z-index: 2; right: 0; top: 40px; width: min(430px, calc(100% - 214px)); }
.ana-sheet { box-shadow: 0 0 0 1px var(--kit-line), 0 1px 1px rgb(16 24 40 / 4%), 0 24px 48px -16px rgb(16 24 40 / 20%), 0 60px 100px -40px rgb(16 24 40 / 30%); }
.ana-sheet-body { padding: 8px 24px 24px; }
.ana-row { padding: 18px 0; }
.ana-row + .ana-row { border-top: 1px solid var(--kit-line); }
.ana-row p { margin: 10px 0 0; font: 400 17px/25px var(--font-text); color: var(--ink); text-wrap: pretty; }
.ana-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.ana-row.is-first { margin-inline: -12px; padding-inline: 12px; border-radius: 14px; border-top-color: transparent; background: color-mix(in srgb, var(--kit-accent) 9%, #fff); }
.ana-row.is-first + .ana-row { border-top-color: transparent; }
.ana-row.is-first .ana-label { color: color-mix(in srgb, var(--kit-accent) 85%, var(--ink)); }
.ana-under { position: relative; white-space: nowrap; }
.ana-under svg { position: absolute; left: -1%; width: 102%; bottom: -.28em; height: .3em; overflow: visible; pointer-events: none; }
.ana-under path { fill: none; stroke: var(--kit-accent); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }

@media (prefers-reduced-motion: no-preference) {
  .ana-scrap { animation: ana-tidy 2.2s linear both; animation-delay: calc(var(--n) * 70ms + 150ms); }
  @keyframes ana-tidy {
    0%   { opacity: 0; transform: translate(var(--fx), calc(var(--fy) - 70px)) rotate(var(--fr)); animation-timing-function: cubic-bezier(.22, .9, .24, 1); }
    18%  { opacity: 1; transform: translate(var(--fx), var(--fy)) rotate(var(--fr)); }
    52%  { opacity: 1; transform: translate(var(--fx), var(--fy)) rotate(var(--fr)); animation-timing-function: cubic-bezier(.3, .1, .2, 1); }
    100% { opacity: 1; transform: translate(0, 0) rotate(var(--r)); }
  }
  .ana-sheet-wrap { animation: ana-rise 1.1s cubic-bezier(.22, .9, .24, 1) 1s both; }
  @keyframes ana-rise { from { opacity: 0; transform: translateY(44px) scale(.97); } to { opacity: 1; transform: none; } }
  .ana-row { animation: ana-line .9s cubic-bezier(.22, .9, .24, 1) both; animation-delay: calc(1.5s + var(--k) * .25s); }
  @keyframes ana-line { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
  .ana-under path { stroke-dasharray: 1 1.02; stroke-dashoffset: 1.01; animation: ana-pen 1s cubic-bezier(.45, .05, .3, 1) 2.7s forwards; }
  @keyframes ana-pen { to { stroke-dashoffset: 0; } }
}

/* ---------------------------------------------------------------- the people who do the work */
.ana-people-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: center; }
.ana-people .kit-p { font-size: 19px; line-height: 28px; max-width: 28em; margin-top: 16px; }
.ana-ask { margin-top: 36px; }
.ana-asks { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 12px 0 0; padding: 0; }
.ana-asks .kit-pill { font-size: 14px; padding: 9px 15px; }

.ana-layers { position: relative; display: grid; gap: 14px; padding-left: 64px; }
.ana-down { position: absolute; left: 4px; top: 8px; width: 40px; height: calc(100% - 16px); overflow: visible; }
.ana-layers .ana-down path { stroke: var(--ink); stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.ana-layer { display: flex; align-items: center; border-radius: 18px; background: #f2f2f5; color: var(--ink-2); font: 400 17px/24px var(--font-text); }
.ana-layer.l1 { width: 58%; height: 64px; padding: 0 22px; margin-left: 21%; }
.ana-layer.l2 { width: 78%; height: 72px; padding: 0 22px; margin-left: 11%; }
.ana-layer.l3 { position: relative; flex-direction: column; align-items: flex-start; justify-content: center; gap: 16px; height: 168px; padding: 0 28px; color: var(--ink); font-size: 19px;
  background: linear-gradient(160deg, color-mix(in srgb, var(--kit-accent) 12%, #fff), #fff 70%);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--kit-accent) 55%, transparent), 0 24px 48px -24px color-mix(in srgb, var(--kit-accent) 55%, transparent); }
.ana-dots { display: flex; gap: 10px; }
.ana-dots i { width: 30px; height: 30px; border-radius: 50%; background: color-mix(in srgb, var(--kit-accent) 22%, #fff); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--kit-accent) 60%, transparent); }
.ana-here { position: absolute; right: 24px; top: 18px; font: italic 400 17px/1 var(--font-display); color: color-mix(in srgb, var(--kit-accent) 85%, var(--ink)); }

/* ---------------------------------------------------------------- the day on one line, gaps marked */
.ana-map-sec .kit-head { max-width: 900px; margin-bottom: 40px; }
.ana-board { padding: 28px 40px 44px; border-radius: 28px; margin: 0; background: linear-gradient(180deg, #f8f8fa, #f1f1f5); }
.ana-cap { display: flex; align-items: center; gap: 12px; font: 400 14px/20px var(--font-text); color: var(--ink-2); margin-bottom: 36px; }
.ana-flow { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr) 72px minmax(0, 1fr) 72px minmax(0, 1fr); align-items: start; padding-bottom: 148px; }
.ana-step { position: relative; min-height: 96px; padding: 20px 22px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--kit-line), 0 14px 26px -18px rgb(16 24 40 / 26%); }
.ana-step .kit-h3 { font-size: 22px; line-height: 28px; }
.ana-tool { display: flex; align-items: center; gap: 6px; margin-top: 4px; font: 400 14px/20px var(--font-text); color: var(--ink-2); }
.ana-tool img { display: block; }
.ana-conn { position: relative; height: 96px; display: grid; place-items: center; }
.ana-conn svg { display: block; width: 72px; height: 72px; overflow: visible; }
.ana-conn .ink path, .ana-trio .ana-ico path, .ana-trio .ana-ico circle, .ana-drop path { stroke: var(--ink); }
.ana-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--kit-accent); color: #fff; font: 500 12px/1 var(--font-text); flex: none; }
.ana-conn .ana-n { position: absolute; top: 6px; right: 0; }
.ana-gap { position: absolute; left: 0; right: 0; top: 100%; }
.ana-drop { display: block; width: 24px; height: 40px; margin-left: 28px; overflow: visible; }
.ana-drop path { fill: none; stroke-width: 1.8; stroke-dasharray: 3 5; }
.ana-gap-card { position: relative; padding: 16px 22px; border-radius: 16px; border: 1.5px dashed #b4b4be; background: rgb(255 255 255 / 60%); }
.ana-gap-card .kit-h3 { font-size: 22px; line-height: 28px; }
.ana-gap-card .ana-n { position: absolute; top: -14px; right: -12px; }

.ana-legend { list-style: none; margin: 0; padding: 32px 0 0; border-top: 1px solid var(--kit-line); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
.ana-legend li { display: grid; grid-template-columns: 24px 1fr; column-gap: 14px; align-items: start; }
.ana-legend .ana-n { margin-top: 3px; }
.ana-legend .kit-h3 { font-size: 22px; line-height: 30px; }
.ana-legend .kit-p { grid-column: 2; margin-top: 2px; font-size: 16px; line-height: 24px; }
.ana-more { margin-top: 32px; }

/* ---------------------------------------------------------------- chain and the free closing */
.ana-next { padding-bottom: 8px; }
.ana-free { padding-top: 72px; }
.ana-close { padding: 64px; border-radius: 32px; text-align: left;
  background: radial-gradient(70% 90% at 100% 0%, color-mix(in srgb, var(--kit-accent) 13%, transparent), transparent 70%), linear-gradient(180deg, #f8f8fa, #f1f1f5); }
.ana-close .kit-head { margin-bottom: 36px; }
.ana-close .kit-p { margin-top: 12px; }
.ana-trio { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.ana-trio li { display: flex; flex-direction: column; gap: 18px; padding: 26px 26px 28px; border-radius: 20px; background: #fff; box-shadow: 0 0 0 1px var(--kit-line), 0 14px 26px -18px rgb(16 24 40 / 22%); }
.ana-ico { display: block; width: 60px; height: 60px; overflow: visible; }
.ana-ico path, .ana-ico circle { stroke-width: 1.8; }
.ana-trio .kit-h3 { font-size: 22px; line-height: 28px; }
.ana-actions { justify-content: flex-start; margin-top: 40px; }
.ana-price { max-width: 640px; margin: 24px 0 0; color: var(--ink-2); }

/* ---------------------------------------------------------------- tablet and phone */
@media (max-width: 1023px) {
  .ana-stage { margin-inline: auto; max-width: 600px; }
  .ana-people-grid { grid-template-columns: 1fr; gap: 48px; }
  .ana-flow { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr) 44px minmax(0, 1fr); }
  .ana-conn svg { width: 44px; height: 44px; }
  .ana-conn .ana-n { top: 14px; right: -2px; }
  .ana-step { padding: 16px 14px; }
  .ana-step .kit-h3, .ana-gap-card .kit-h3 { font-size: 20px; line-height: 26px; }
  .ana-board { padding: 24px 24px 36px; }
  .ana-close { padding: 44px 32px; }
}
@media (max-width: 767px) {
  .ana-hero .kit-hero-actions { margin-top: 28px; }
  .ana-stage { height: 540px; max-width: 420px; }
  .ana-stage-sample { top: 0; }
  .ana-scrap { width: calc(50% - 8px); padding: 10px 12px; }
  .ana-s1 { left: 0; top: 34px; }
  .ana-s2, .ana-s4 { display: none; }
  .ana-s3 { left: auto; right: 0; top: 34px; width: calc(50% - 8px); }
  .ana-s1 p { font-size: 13px; line-height: 18px; }
  .ana-hand { font-size: 16px; line-height: 22px; }
  .ana-sheet-wrap { top: 160px; width: 100%; }
  .ana-sheet-body { padding: 4px 18px 18px; }
  .ana-row p { font-size: 16px; line-height: 23px; }
  .ana-row { padding: 14px 0; }
  .ana-row.is-first { margin-inline: -10px; padding-inline: 10px; }
  .ana-layers { padding-left: 44px; }
  .ana-layer.l1 { width: 64%; margin-left: 18%; }
  .ana-layer.l2 { width: 82%; margin-left: 9%; }
  .ana-layer.l3 { height: 156px; padding: 0 18px; font-size: 17px; }
  .ana-down { left: 0; width: 32px; }
  .ana-board { padding: 20px 16px 28px; border-radius: 24px; }
  .ana-cap { margin-bottom: 24px; flex-wrap: wrap; }
  .ana-flow { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
  .ana-conn { height: 64px; justify-items: start; padding-left: 28px; }
  .ana-conn svg { width: 56px; height: 56px; transform: rotate(90deg); }
  .ana-conn .ana-n { top: 4px; right: auto; left: 86px; }
  @media (prefers-reduced-motion: no-preference) { .ana-scrap { animation-name: ana-tidy-m; } }
  .ana-gap { position: static; margin-top: 14px; }
  .ana-drop { display: none; }
  .ana-legend { grid-template-columns: 1fr; gap: 20px; padding-top: 24px; margin-top: 24px; }
  .ana-trio { grid-template-columns: 1fr; }
  .ana-close { padding: 32px 20px; border-radius: 24px; }
  .ana-free { padding-top: 40px; }
  .ana-actions { margin-top: 28px; }
}
@keyframes ana-tidy-m { from { opacity: 0; transform: translateY(-22px) rotate(calc(var(--r) * -2)); } to { opacity: 1; transform: rotate(var(--r)); } }
