.alappont-heart-trigger {
    display: inline;
    padding: 2px 4px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.alappont-heart-trigger:hover { color: #00b5df; }
.alappont-heart-trigger:focus-visible { outline: 2px solid #00b5df; outline-offset: 3px; }

.alappont-heart-modal .uk-modal-dialog {
    box-sizing: border-box;
    width: min(92vw, 860px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    margin: 24px auto;
    padding: 30px;
    overflow: auto;
    border: 1px solid #303841;
    border-radius: 14px;
    background: #090c10;
    color: #d9dee3;
    font-family: 'Red Hat Display', sans-serif;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .56);
}

.alappont-heart-modal .uk-modal-close-default { color: #d9dee3; }
.alappont-heart__icon { display: block; flex: 0 0 auto; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; }
.alappont-heart__icon--filled { fill: currentColor; stroke: none; }
.alappont-heart-modal .alappont-heart__close { display: inline-flex; width: 32px; height: 32px; align-items: center; justify-content: center; padding: 7px; border: 0; background: transparent; cursor: pointer; }
.alappont-heart__kicker { color: #00b5df; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.alappont-heart-modal h2 { margin: 10px 30px 8px 0; color: #f0f2f4; font: 500 30px/1.15 'Red Hat Display', sans-serif; }
.alappont-heart__intro { margin: 0; color: #8e99a3; font-size: 14px; line-height: 1.6; }
.alappont-heart__equation { margin: 16px 0; color: #dceaf4; font-size: clamp(16px, 3.8vw, 21px); font-weight: 600; letter-spacing: .02em; text-align: center; }

.alappont-heart__plot {
    position: relative;
    overflow: hidden;
    border: 1px solid #29343e;
    border-radius: 11px;
    background: #0b1117;
}

.alappont-heart__svg { display: block; width: 100%; height: clamp(250px, 43vh, 380px); outline: none; touch-action: none; cursor: grab; user-select: none; }
.alappont-heart__svg.is-dragging { cursor: grabbing; }
.alappont-heart__svg:focus-visible { box-shadow: inset 0 0 0 2px #00b5df; }
.alappont-heart__grid-line { stroke: #1d2a35; stroke-width: 1; }
.alappont-heart__axis { stroke: #485866; stroke-width: 1.25; }
.alappont-heart__tick { fill: #7f929f; font: 11px 'Roboto', sans-serif; }
.alappont-heart__axis-name { fill: #c0d0dc; font: 500 12px 'Red Hat Display', sans-serif; }
.alappont-heart__curve { fill: rgba(7, 94, 168, .12); stroke: url(#alappont-heart-gradient); stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.alappont-heart__glow { fill: none; stroke: #00b5df; stroke-width: 4; opacity: .24; filter: url(#alappont-heart-glow); }
.alappont-heart__point-halo { fill: rgba(0, 181, 223, .18); }
.alappont-heart__point { fill: #edfaff; stroke: #00b5df; stroke-width: 2; }

.alappont-heart__toolbar { position: absolute; top: 10px; right: 10px; display: flex; gap: 5px; }
.alappont-heart__toolbar button { display: inline-flex; min-width: 34px; height: 34px; align-items: center; justify-content: center; gap: 6px; padding: 0 10px; border: 1px solid #344350; border-radius: 7px; background: #101a23; color: #e3edf4; font: 400 20px 'Red Hat Display', sans-serif; cursor: pointer; }
.alappont-heart__toolbar .alappont-heart__reset { font-size: 12px; }
.alappont-heart__toolbar button:hover { border-color: #00b5df; background: #13283a; }
.alappont-heart__toolbar button:focus-visible, .alappont-heart__play:focus-visible { outline: 2px solid #00b5df; outline-offset: 2px; }

.alappont-heart__readout { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 12px 0 18px; font-size: 12px; }
.alappont-heart__readout > span { display: inline-flex; align-items: center; gap: 7px; color: #8e99a3; }
.alappont-heart__legend-dot { display: block; flex: 0 0 auto; width: 6px; height: 6px; fill: #00b5df; }
.alappont-heart__readout output { color: #b6e9f5; font-variant-numeric: tabular-nums; }
.alappont-heart__controls { display: flex; align-items: center; gap: 18px; }
.alappont-heart__play { display: inline-flex; flex: 0 0 auto; min-width: 112px; height: 42px; align-items: center; justify-content: center; gap: 7px; padding: 0 15px; border: 1px solid #075ea8; border-radius: 22px; background: #075ea8; color: #fff; font: 600 13px 'Red Hat Display', sans-serif; cursor: pointer; }
.alappont-heart__play:hover { border-color: #1687d5; background: #0872bd; }
.alappont-heart__slider { display: grid; flex: 1 1 auto; min-width: 0; grid-template-columns: 1fr auto; align-items: center; gap: 5px 10px; color: #aebdc9; font-size: 12px; }
.alappont-heart__slider output { color: #00b5df; font-variant-numeric: tabular-nums; }
.alappont-heart__slider input { grid-column: 1 / -1; box-sizing: border-box; width: 100%; min-width: 0; height: 24px; margin: 0; accent-color: #00b5df; cursor: pointer; }
.alappont-heart__hint { margin: 15px 0 0; color: #8e99a3; font-size: 11px; line-height: 1.6; }

.alappont-heart__complex { margin-top: 18px; border-top: 1px solid #29343e; font-size: 13px; line-height: 1.7; }
.alappont-heart__complex summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 0 2px; color: #68c8e7; font-weight: 600; list-style: none; cursor: pointer; }
.alappont-heart__complex summary::-webkit-details-marker { display: none; }
.alappont-heart__complex[open] summary .alappont-heart__icon { transform: rotate(180deg); }
.alappont-heart__complex summary:focus-visible { outline: 2px solid #00b5df; outline-offset: 3px; border-radius: 4px; }
.alappont-heart__complex-body { min-width: 0; color: #9dacb8; }
.alappont-heart__complex-body p { margin: 12px 0; }
.alappont-heart__complex-body ol { margin: 0; padding-left: 20px; }
.alappont-heart__complex-body li { min-width: 0; padding-left: 4px; }
.alappont-heart__complex-body strong { color: #dce3e8; font-weight: 600; }
.alappont-heart__complex-point output { color: #b6e9f5; font-variant-numeric: tabular-nums; }
.alappont-heart__math { max-width: 100%; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; color: #dceaf4; font-size: .9em; }
.alappont-heart__math .katex-display { margin: .7em 0; }
.alappont-heart__complex .alappont-heart__reference { font-size: 11px; }
.alappont-heart__reference a { color: #68c8e7; text-decoration: underline; }

@media (max-width: 640px) {
    .alappont-heart-modal .uk-modal-dialog { width: calc(100vw - 24px); max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); margin: 12px auto; padding: 24px 18px; }
    .alappont-heart-modal h2 { font-size: 25px; }
    .alappont-heart__intro { font-size: 13px; }
    .alappont-heart__controls { gap: 12px; }
    .alappont-heart__play { min-width: 100px; padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .alappont-heart-modal * { scroll-behavior: auto; }
}
