/* Lend and hedge on Lighter (site/lighter-hedge.js): its part of the Lend card, its progress on the done screen. In the
   page's own tokens (pro.css, rh.css; dark.css redefines them), so light and dark follow the page. */

/* The switch, as Lend it too's (app-core.css .olendtoo). */
.ohedge-sw { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; line-height: 1.4; color: var(--ink); cursor: pointer; }
.ohedge-sw input { flex: none; appearance: none; -webkit-appearance: none; position: relative; width: 38px; height: 22px; margin: 0; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: background .15s; }
.ohedge-sw input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(13, 13, 15, .25); transition: transform .15s; }
.ohedge-sw input:checked { background: var(--act); }
.ohedge-sw input:checked::after { transform: translateX(16px); }
.ohedge-sw input:focus-visible { outline: 2px solid var(--act); outline-offset: 2px; }
.ohedge-sw input:disabled { opacity: .6; cursor: default; }
.ohedge-sw > span { display: grid; gap: 2px; min-width: 0; }
.ohedge-sw small { font-size: 13px; color: var(--text-3); }

.ohedge { margin-top: 4px; }
.ohedge .orow { min-height: 46px; }
.ohedge-parts { margin: 6px 0 2px; display: grid; gap: 6px; }
.ohedge-parts > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13px; line-height: 1.4; }
.ohedge-parts dt { color: var(--text-2); min-width: 0; }
.ohedge-parts dd { margin: 0; text-align: right; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ohedge-parts dd small { display: block; font-size: 12px; font-weight: 500; color: var(--text-3); }
.ohedge-m { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; font-size: 15px; font-weight: 500; color: var(--ink); }
.ohedge-m .omode { flex: 0 1 240px; margin: 0; }
.ohedge-risk, .ohedge-note { margin-top: 8px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.ohedge-note.warn { color: var(--down); }
.ohedge-w { display: flex; align-items: center; gap: 10px; margin: 10px 0 6px; font-size: 13px; line-height: 1.4; color: var(--ink); cursor: pointer; }
.ohedge .orow.keep b { white-space: nowrap; }
.ohedge .orow.keep b small { white-space: normal; }
.ohedge-w input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--act); }
.ohedge-w input:disabled + span { color: var(--text-3); }
.ohedge-fine { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--text-3); }

/* The done screen: each step of the hedge, the one under way with its clock. */
.ohedge-run { margin-top: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; text-align: left; }
.ohedge-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.ohedge-steps li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding-left: 26px; font-size: 14px; line-height: 1.45; color: var(--text-3); }
.ohedge-steps li::before { content: ""; position: absolute; left: 0; top: 2px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); box-sizing: border-box; }
.ohedge-steps li.done { color: var(--ink); }
.ohedge-steps li.done::before { border-color: var(--up); background: var(--up); box-shadow: inset 0 0 0 3px var(--surface); }
.ohedge-steps li.now { color: var(--ink); font-weight: 600; }
.ohedge-steps li.now::before { border-color: var(--act); border-top-color: transparent; animation: ospin .9s linear infinite; }
.ohedge-steps li.fail { color: var(--down); }
.ohedge-steps li.fail::before { border-color: var(--down); }
.ohedge-steps small { flex: none; font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 500; }
.ohedge-run .pbtn { margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .ohedge-steps li.now::before { animation: none; } }
