/* Tine alternative frontend. System fonts only: the page makes no third-party style or font requests. */
:root {
  color-scheme:dark;
  --bg:#111116;
  --landing-glow:#e3814a21;
  --panel:#19191f;
  --panel2:#202027;
  --line:#2f2f38;
  --edge:#737180;
  --text:#f3f1ef;
  --muted:#a9a7b4;
  --accent:#ff844e;
  --accent2:#ffa278;
  --accent-soft:#35251f;
  --accent-ink:#ff9a6b;
  --on-accent:#201710;
  --good:#b4d8a7;
  --good-soft:#243029;
  --bad:#f6aa9f;
  --bad-soft:#3a2323;
  --warn:#f0c674;
  --warn-soft:#37301c;
  --shadow:0 24px 80px #0004;
  --radius:20px;
  font-family:ui-sans-serif,system-ui,-apple-system,'Segoe UI',Roboto,'Helvetica Neue',Arial,sans-serif;
  font-synthesis:none
}
/* Both schemes in one list: the system setting decides, and the header toggle overrides it through the
   color-scheme meta tag. Browsers without light-dark() keep the dark list above. */
@supports (color:light-dark(#000,#fff)) {
  :root {
    color-scheme:light dark;
    --bg:light-dark(#f5f3ee,#111116);
    --landing-glow:light-dark(#db713547,#e3814a21);
    --panel:light-dark(#fffefa,#19191f);
    --panel2:light-dark(#efede7,#202027);
    --line:light-dark(#dedbd2,#2f2f38);
    --edge:light-dark(#85807a,#737180);
    --text:light-dark(#252429,#f3f1ef);
    --muted:light-dark(#5f5b64,#a9a7b4);
    --accent:light-dark(#d8632e,#ff844e);
    --accent2:light-dark(#e87d4a,#ffa278);
    --accent-soft:light-dark(#f9e9de,#35251f);
    --accent-ink:light-dark(#a04016,#ff9a6b);
    --good:light-dark(#2f5a26,#b4d8a7);
    --good-soft:light-dark(#e3eede,#243029);
    --bad:light-dark(#9b2317,#f6aa9f);
    --bad-soft:light-dark(#f9e3df,#3a2323);
    --warn:light-dark(#6f4b00,#f0c674);
    --warn-soft:light-dark(#f6ecd0,#37301c);
    --shadow:0 24px 80px light-dark(#2920180f,#0004)
  }
  :root:has(> head > meta[name="color-scheme"][content="dark"]) { color-scheme:dark }
  :root:has(> head > meta[name="color-scheme"][content="light"]) { color-scheme:light }
}

* { box-sizing:border-box }
@media (prefers-reduced-motion:no-preference) { @view-transition { navigation:auto } }
html { scroll-behavior:smooth }
body { margin:0; background:var(--bg); color:var(--text); font-size:.9375rem; line-height:1.55; min-width:320px; font-variant-numeric:tabular-nums; overflow-wrap:anywhere }
button,input,select { font:inherit; color:inherit }
button,a,input,select,summary { -webkit-tap-highlight-color:transparent }
button,a { touch-action:manipulation }
button { cursor:pointer }
button:disabled { cursor:not-allowed; opacity:.55 }
a { color:inherit }
:focus-visible { outline:2px solid var(--accent-ink); outline-offset:3px; border-radius:6px }
h1,h2,h3,p { margin-top:0 }
h1,h2,h3 { font-weight:700; letter-spacing:-.03em; line-height:1.15; text-wrap:balance }
h1 { font-size:clamp(1.75rem,.5rem + 2.72vw,2.5rem); margin-bottom:10px }
h2 { font-size:1.25rem; margin-bottom:0 }
h3 { font-size:1rem; margin-bottom:0 }
p { color:var(--muted) }
p,li { text-wrap:pretty }
code { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:.92em }
.muted { color:var(--muted) }
[hidden] { display:none!important }
.sr-only { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap }
.skip-link { position:absolute; left:12px; top:12px; translate:0 calc(-100% - 16px); z-index:10; padding:12px 16px; border-radius:10px; background:var(--accent); color:var(--on-accent); font-weight:700 }
.skip-link:focus { translate:none }

/* Shared controls */
.wordmark { font-size:2rem; font-weight:800; letter-spacing:-.07em; line-height:1; display:inline-flex; align-items:center; gap:8px; text-decoration:none; min-height:44px; white-space:nowrap }
.wordmark img { border-radius:6px }
.button { display:inline-flex; align-items:center; justify-content:center; gap:14px; min-height:48px; padding:12px 22px; border:1px solid var(--edge); background:var(--panel2); font-weight:650; border-radius:12px; text-decoration:none; transition:background .16s,transform .16s }
.button:hover:not(:disabled) { background:var(--line) }
.button.primary { background:var(--accent); border-color:var(--accent); color:var(--on-accent) }
.button.primary:hover:not(:disabled) { background:var(--accent2); border-color:var(--accent2) }
.button.small { min-height:44px; padding:8px 16px; font-size:.875rem; gap:10px }
.button.full { width:100% }
.text-button { border:0; background:transparent; min-height:44px; min-width:44px; padding:0 6px; color:var(--accent-ink); font-size:.8125rem; font-weight:600; text-decoration:underline; text-underline-offset:3px }
.chip { flex:0 0 auto; min-height:44px; min-width:52px; padding:6px 14px; border:1px solid var(--edge); background:transparent; border-radius:10px; font-size:.8125rem; font-weight:600 }
.chip:hover:not(:disabled) { background:var(--panel2) }
.theme-toggle,.icon-button { border:1px solid var(--edge); background:transparent; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; width:2.75rem; height:2.75rem; min-width:44px; min-height:44px; flex:0 0 auto; font-size:1.5rem }
.theme-toggle { border-color:transparent; color:var(--muted); transition:color .15s,background-color .15s }
.theme-toggle:hover { color:var(--text); background:var(--panel2) }
.theme-toggle svg { width:1.25rem; height:1.25rem; fill:none; stroke:currentColor; stroke-width:1.75; stroke-linecap:round; stroke-linejoin:round }
.theme-toggle .to-light { display:none }
@media (prefers-color-scheme:dark) {
  :root:not(:has(> head > meta[name="color-scheme"][content="light"])) .theme-toggle { .to-dark { display:none } .to-light { display:inline } }
}
:root:has(> head > meta[name="color-scheme"][content="dark"]) .theme-toggle { .to-dark { display:none } .to-light { display:inline } }
@supports not (color:light-dark(#000,#fff)) { .theme-toggle { display:none } }
.pill { border-radius:999px; padding:4px 10px; background:var(--line); color:var(--text); font-size:.75rem; font-weight:600; white-space:nowrap }
.pill.green { background:var(--good-soft); color:var(--good) }
.tag { border:1px solid var(--line); border-radius:6px; padding:1px 7px; color:var(--muted); font-size:.6875rem; font-weight:600; letter-spacing:.04em; text-transform:uppercase }
.hint { font-size:.8125rem; line-height:1.6; margin:12px 0 0 }
.fine-print { font-size:.75rem; line-height:1.6; margin:12px 0 0 }
.fine-print a,.hint a,.earn-ref a { color:var(--accent-ink); font-weight:600; white-space:nowrap }
.centered { text-align:center }
.callout { margin:16px 0 0; padding:12px 14px; border-radius:12px; background:var(--panel2); border:1px solid var(--line); color:var(--text); font-size:.8125rem; line-height:1.6 }
.token-circle { width:34px; height:34px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; background:#f8f8f8; flex:0 0 auto; overflow:hidden }
.token-circle img { width:24px; height:24px; object-fit:contain }
.unit-box { display:flex; align-items:center; gap:6px; border:1px solid var(--edge); border-radius:10px; padding:0 12px; min-height:46px; background:var(--panel) }
.unit-box input { width:4.75rem; min-height:44px; border:0; background:transparent; text-align:right; font-weight:600 }
.unit-box span { color:var(--muted); font-size:.8125rem }
input[aria-invalid=true],.unit-box:has(input[aria-invalid=true]) { border-color:var(--bad) }
input::-webkit-inner-spin-button { appearance:none }
input[type=number] { -moz-appearance:textfield; appearance:textfield }
select { appearance:none; min-height:44px; padding:0 38px 0 12px; border:1px solid var(--edge); border-radius:10px; background:var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23888' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; font-weight:600 }
select option { background:var(--panel); color:var(--text) }

/* Dashboard shell */
.app-header { min-height:76px; display:flex; align-items:center; gap:40px; padding:0 4%; border-bottom:1px solid var(--line) }
.app-header nav { display:flex; gap:6px; align-self:stretch }
.app-header nav a { display:flex; align-items:center; min-height:44px; padding:0 12px; position:relative; color:var(--muted); font-size:.875rem; font-weight:600; text-decoration:none; white-space:nowrap }
.app-header nav a:hover,.app-header nav a.active { color:var(--text) }
.app-header nav a.active:after { content:''; position:absolute; bottom:0; left:12px; right:12px; height:2px; background:var(--accent) }
.header-right { margin-left:auto; display:flex; align-items:center; gap:12px }
.app-main { max-width:1120px; margin:0 auto; padding:28px 24px 72px; min-height:calc(100dvh - 160px) }
.page-intro { margin-bottom:22px }
.page-intro p,.section-lead { font-size:.9375rem; margin-bottom:0; max-width:68ch }
.section-lead { margin:-8px 0 20px }
.section-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:22px }
.section-heading h1 { margin:0 }
.banner { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 16px; border-radius:14px; margin-bottom:16px; border:1px solid }
.banner strong { display:block }
.banner p { margin:2px 0 0; color:inherit; font-size:.8125rem }
.banner.error { background:var(--bad-soft); border-color:var(--bad); color:var(--bad) }
.banner.warn { background:var(--warn-soft); border-color:var(--warn); color:var(--warn) }
.banner .button { flex:0 0 auto; background:transparent; border-color:currentColor }
.notice { position:fixed; left:50%; bottom:20px; transform:translateX(-50%); z-index:5; width:max-content; max-width:min(560px,calc(100vw - 32px)); padding:13px 18px; border-radius:12px; background:var(--panel2); border:1px solid var(--edge); box-shadow:var(--shadow); font-size:.875rem; font-weight:600 }
.notice.success,.dialog-notice.success { background:var(--good-soft); border-color:var(--good); color:var(--good) }
.notice.error,.dialog-notice.error { background:var(--bad-soft); border-color:var(--bad); color:var(--bad) }
.empty-copy { padding:28px 0; text-align:center }
.site-footer { display:grid; justify-items:center; gap:8px; padding:12px max(16px,4%); border-top:1px solid var(--line); font-size:.8125rem; text-align:center }
.site-footer nav { display:flex; flex-wrap:wrap; justify-content:center; gap:4px }
.site-footer nav a { display:inline-flex; align-items:center; min-height:44px; padding:0 10px; text-decoration:none; color:var(--muted); font-weight:600 }
.site-footer nav a:hover { color:var(--text) }
#snapshot-footer:empty { display:none }
footer a[aria-disabled="true"] { pointer-events:none }

/* Deposit: one card, one decision at a time */
.deposit-card { display:grid; grid-template-columns:minmax(0,1.1fr) minmax(0,1fr); border:1px solid var(--line); border-radius:var(--radius); background:var(--panel); box-shadow:var(--shadow); overflow:hidden }
.deposit-steps { padding:28px }
fieldset { border:0; padding:0; margin:0 0 28px; min-width:0 }
fieldset:last-child { margin-bottom:0 }
legend,.earn-head h2 { display:flex; align-items:center; gap:10px; padding:0 0 14px; font-weight:700; font-size:1rem; letter-spacing:-.01em }
.earn-head h2 { padding:0; margin:0 }
.step-dot { display:inline-flex; align-items:center; justify-content:center; width:1.5rem; height:1.5rem; flex:0 0 auto; border:1px solid var(--edge); border-radius:50%; color:var(--muted); font-size:.75rem; font-weight:700 }
.amount-box { display:flex; align-items:center; gap:10px; border:1px solid var(--edge); border-radius:14px; padding:10px 10px 10px 16px; background:var(--panel2) }
.amount-box:focus-within { border-color:var(--accent-ink) }
.amount-box input[type=text] { flex:1; min-width:0; min-height:48px; border:0; background:transparent; font-size:1.875rem; font-weight:650; letter-spacing:-.02em; outline:0 }
.token-button { display:inline-flex; align-items:center; gap:8px; min-height:48px; padding:6px 12px 6px 6px; border:1px solid var(--edge); border-radius:999px; background:var(--panel); font-weight:700 }
.token-button:hover { background:var(--line) }
.amount-caption { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-top:8px; font-size:.8125rem; color:var(--muted) }
.field-error { margin:8px 0 0; color:var(--bad); font-size:.8125rem; font-weight:600 }
.term-presets { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:8px }
.term-presets button { min-height:44px; padding:6px 4px; border:1px solid var(--edge); background:transparent; border-radius:10px; font-size:.8125rem; font-weight:600; white-space:nowrap }
.term-presets button:hover { background:var(--panel2) }
.term-presets button.selected { background:var(--accent-soft); border-color:var(--accent); color:var(--accent-ink) }
.term-controls { padding-top:6px }
.term-range-heading { display:flex; justify-content:space-between; gap:12px; margin-top:12px; font-size:.8125rem }
.term-range-heading output { font-weight:700; color:var(--accent-ink) }
input[type=range] { width:100%; min-height:44px; margin:0; accent-color:var(--accent) }
.term-scale { display:flex; justify-content:space-between; gap:12px; margin:-4px 0 0; font-size:.75rem; line-height:1.5 }
.term-exact { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:12px; margin-top:14px; font-size:.875rem }
.term-exact label { flex:1 1 9rem }
.term-exact .unit-box { flex-shrink:0 }
.term-exact .unit-box span { white-space:nowrap }
.term-summary { display:flex; justify-content:space-between; gap:12px; margin-top:14px; padding:12px 14px; border-radius:12px; background:var(--panel2); font-size:.875rem }
.term-summary strong { color:var(--good) }

.earn-panel { padding:28px; border-left:1px solid var(--line); background:var(--panel2); display:flex; flex-direction:column; gap:16px; min-width:0 }
.earn-head { display:flex; align-items:center; justify-content:space-between; gap:12px }
.earn-block { padding:16px; border:1px solid var(--line); border-radius:14px; background:var(--panel) }
.earn-label { display:flex; justify-content:space-between; align-items:center; gap:8px; font-weight:700; font-size:.875rem }
.earn-value { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; margin-top:8px }
.earn-value strong { font-size:1.625rem; font-weight:700; letter-spacing:-.03em; line-height:1.15 }
.earn-value span { color:var(--muted); font-size:.8125rem }
.earn-apr { margin:8px 0 0; font-size:.875rem; color:var(--text) }
.earn-apr span { color:var(--muted); font-size:.8125rem }
.earn-note,.earn-ref { margin:8px 0 0; font-size:.8125rem; line-height:1.55 }
.earn-ref { font-size:.75rem }
.assumptions { margin-top:8px; font-size:.75rem }
.assumptions summary { display:flex; align-items:center; min-height:44px; cursor:pointer; color:var(--accent-ink); font-weight:600 }
.assumptions p { margin:0; font-size:.75rem; line-height:1.6 }
.earn-combined { padding:2px 0; font-size:.8125rem }
.earn-combined div { display:flex; flex-direction:column; gap:6px; color:var(--muted); font-weight:600 }
.earn-combined strong { color:var(--text); font-size:clamp(1.875rem,.5rem + 3.27vw,2.75rem); font-weight:700; line-height:1.15; letter-spacing:-.04em }
.earn-combined small { display:block; margin-top:10px; color:var(--muted); font-size:.75rem; line-height:1.55 }
.earn-breakdown { border-top:1px solid var(--line); border-bottom:1px solid var(--line) }
.earn-breakdown > summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:48px; cursor:pointer; font-size:.8125rem; font-weight:600; color:var(--accent-ink) }
.earn-breakdown > summary::after { content:'+'; font-size:1.25rem }
.earn-breakdown[open] > summary::after { content:'−' }
.earn-breakdown .earn-block { margin-bottom:12px }
.earn-split { margin:0; padding:12px 14px; border-left:3px solid var(--accent); background:var(--panel); border-radius:0 10px 10px 0; font-size:.75rem; line-height:1.6 }
.earn-panel .button.full { margin-top:4px }
.earn-panel .fine-print { margin:0 }

.pool-strip { margin-top:36px }
.pool-strip .section-lead { margin:6px 0 0 }
.pool-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px; margin-top:14px }
.pool-card { padding:18px; border:1px solid var(--line); border-radius:16px; background:var(--panel) }
.pool-card dl { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:12px 16px; margin:16px 0 0 }
.pool-card dt { font-size:.75rem; color:var(--muted) }
.pool-card dd { margin:2px 0 0; font-weight:700 }

/* Positions and contracts */
.portfolio-totals { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:12px; margin-bottom:20px }
.portfolio-totals:empty { display:none }
.total-chip { border:1px solid var(--line); background:var(--panel); border-radius:14px; padding:14px 18px }
.total-chip span { display:block; font-size:.75rem; color:var(--muted) }
.total-chip strong { font-size:1.25rem; letter-spacing:-.02em }
.total-chip small { display:block }
.positions-list { display:grid; gap:14px }
.position-card { border:1px solid var(--line); background:var(--panel); border-radius:18px; padding:20px 22px }
.nft-frame { width:min(100%,300px); aspect-ratio:300/470; margin:0 auto }
.nft-frame img { width:100%; height:auto }
.position-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px }
.position-title { display:flex; align-items:center; gap:12px; min-width:0 }
.position-title small { display:block; color:var(--muted); font-size:.8125rem }
.position-stats { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin:18px 0 0; padding:16px 0 0; border-top:1px solid var(--line) }
.position-stats span { display:block; color:var(--muted); font-size:.75rem; font-weight:600 }
.position-stats strong { display:block; font-size:1.1875rem; letter-spacing:-.02em; margin:2px 0 }
.position-stats small { color:var(--muted); font-size:.75rem; line-height:1.5; display:block }
.position-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:18px }
.empty-state { text-align:center; padding:56px 20px; border:1px dashed var(--edge); border-radius:20px }
.empty-state img { border-radius:50%; margin-bottom:14px }
.empty-state h2 { margin-bottom:8px }
.spinner { width:32px; height:32px; margin:0 auto 16px; border:3px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:spin .9s linear infinite }
@keyframes spin { to { transform:rotate(360deg) } }
.contract-row { display:flex; justify-content:space-between; align-items:center; gap:16px; min-height:52px; padding:6px 0; border-bottom:1px solid var(--line); font-size:.875rem }
.contract-row code { display:flex; align-items:center; gap:10px; text-align:right }

/* Sheets */
dialog { width:min(560px,calc(100vw - 24px)); max-height:calc(100dvh - 24px); overflow:auto; border:1px solid var(--line); border-radius:20px; background:var(--panel); color:var(--text); padding:24px; box-shadow:var(--shadow); overscroll-behavior:contain }
dialog::backdrop { background:#000a; overflow:hidden; overscroll-behavior:contain }
.dialog-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px }
.dialog-notice { margin:14px 0 0; padding:10px 12px; border-radius:10px; border:1px solid var(--line); background:var(--panel2); color:var(--text); font-size:.8125rem; font-weight:600 }
.dialog-notice:empty { display:none }
.percent-row { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin-top:10px }
.percent-row .chip[aria-pressed=true] { background:var(--accent-soft); border-color:var(--accent); color:var(--accent-ink) }
#renew-summary .hint { margin-bottom:6px }
#renew-progress:empty { display:none }
#position-dialog-content .button.full { margin-top:18px }
.action-context { margin:0 0 22px; color:var(--muted); font-size:.8125rem }
.action-field { margin-bottom:22px }
.action-field legend { padding-bottom:12px }
.action-field .hint { margin:10px 0 0 }
.amount-unit { flex:0 0 auto; padding-right:6px; text-align:right; font-weight:700 }
.amount-unit small { display:block; font-size:.6875rem; font-weight:500; color:var(--muted) }
.action-summary { display:flex; justify-content:space-between; align-items:center; gap:16px; padding:12px 0; border-top:1px solid var(--line); font-size:.875rem }
.action-summary span { color:var(--muted) }
.action-summary strong { text-align:right; font-weight:600 }
.action-terms p { margin:0 }
.action-terms p+p { margin-top:8px }
.token-group { margin:18px 0 8px; font-size:.8125rem; color:var(--muted); letter-spacing:0 }
.token-list { display:grid; gap:6px }
.token-option,.wallet-option { display:flex; align-items:center; gap:12px; width:100%; min-height:56px; padding:8px 12px; border:1px solid var(--line); border-radius:12px; background:transparent; text-align:left }
.token-option:hover:not(:disabled),.wallet-option:hover { background:var(--panel2) }
.token-option.selected { border-color:var(--accent); background:var(--accent-soft) }
.token-name { flex:1; min-width:0 }
.token-name strong { display:block }
.token-name small { display:block; color:var(--muted); font-size:.75rem; line-height:1.4 }
.token-amount { font-weight:600; font-size:.875rem; white-space:nowrap }
.wallet-option { margin-top:8px; font-weight:600 }
.wallet-option img { width:28px; height:28px; border-radius:6px }
.review-route { padding:16px; border-radius:14px; background:var(--panel2); border:1px solid var(--line); margin-bottom:8px }
.review-route>span { display:block; color:var(--muted); font-size:.8125rem }
.review-route>strong { display:block; font-size:1.625rem; letter-spacing:-.03em; margin:2px 0 12px }
.route-steps { display:flex; flex-wrap:wrap; align-items:center; gap:6px 22px; list-style:none; margin:0; padding:0; font-size:.75rem; font-weight:600 }
.route-steps li { position:relative; padding:4px 10px; border:1px solid var(--edge); border-radius:999px; background:var(--panel); white-space:nowrap }
.route-steps li:not(:last-child):after { content:'→'; position:absolute; right:-17px; top:50%; transform:translateY(-50%); color:var(--muted) }
.review-line { display:flex; justify-content:space-between; gap:16px; padding:10px 0; border-bottom:1px solid var(--line); font-size:.875rem }
.review-line span { color:var(--muted); flex:0 0 auto }
.review-line strong { text-align:right; font-weight:600 }
.review-note { margin:12px 0 0; padding:12px 14px; border-radius:12px; background:var(--accent-soft); color:var(--text); font-size:.8125rem; line-height:1.6 }
.review-settings { margin-top:12px }
.slippage-row { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:.875rem; font-weight:600 }
.review-settings .fine-print { margin-top:6px }
.quote-expiry { margin:10px 0 0; font-size:.8125rem; font-weight:600; color:var(--text) }
.signatures-title { margin:18px 0 8px; font-size:.875rem }
.signature-plan { list-style:none; counter-reset:step; margin:0; padding:0; display:grid; gap:8px }
.step-row { counter-increment:step; display:grid; grid-template-columns:1.75rem minmax(0,1fr) minmax(0,auto); gap:10px; align-items:start; padding:12px; border:1px solid var(--line); border-radius:12px; font-size:.8125rem }
.step-row:before { content:counter(step); display:inline-flex; align-items:center; justify-content:center; width:1.625rem; height:1.625rem; border-radius:50%; border:1px solid var(--edge); font-size:.75rem; font-weight:700 }
.step-what small,.step-status small { display:block; color:var(--muted); font-size:.75rem; line-height:1.5; font-weight:400 }
.step-status { text-align:right; font-weight:700; max-width:190px }
.step-status code { display:block; font-weight:400 }
.step-row.signing,.step-row.sent,.step-row.pending { border-color:var(--warn) }
.step-row.signing .step-status span,.step-row.sent .step-status span,.step-row.pending .step-status span { color:var(--warn) }
.step-row.confirmed { border-color:var(--good) }
.step-row.confirmed:before { content:'✓'; background:var(--good-soft); border-color:var(--good); color:var(--good) }
.step-row.confirmed .step-status span { color:var(--good) }
.step-row.rejected,.step-row.failed { border-color:var(--bad) }
.step-row.rejected:before,.step-row.failed:before { content:'!'; background:var(--bad-soft); border-color:var(--bad); color:var(--bad) }
.step-row.rejected .step-status,.step-row.failed .step-status { color:var(--bad) }
.step-row.rejected .step-status small,.step-row.failed .step-status small { color:var(--bad) }
#confirm-action { margin-top:16px }

/* Landing */
.landing { display:flex; flex-direction:column; min-height:100dvh; background:radial-gradient(ellipse 74% 58% at 50% 38%,var(--landing-glow),transparent),var(--bg) }
.landing-header { padding:22px 5%; display:flex; align-items:center; justify-content:space-between }
.hero { text-align:center; max-width:820px; margin:auto; padding:8px 24px 48px }
.hero h1 { font-size:clamp(2.375rem,1rem + 4.2vw,4rem); letter-spacing:-.05em; line-height:1.06; margin:0 0 18px }
.hero-copy { font-size:1.125rem; line-height:1.6; margin:0 auto 26px; max-width:52ch }
.hero-actions { display:flex; flex-wrap:wrap; justify-content:center; align-items:center; gap:12px 28px }
.text-link { display:inline-flex; align-items:center; gap:10px; min-height:44px; font-weight:600; text-decoration:underline; text-underline-offset:4px }

/* FAQ */
.faq-page { max-width:820px; margin:0 auto; padding:36px 24px 72px }
.faq-lead { font-size:1.0625rem; max-width:62ch }
.faq-nav { display:flex; flex-wrap:wrap; gap:8px; margin:22px 0 8px; padding:0; list-style:none }
.faq-nav a { display:inline-flex; align-items:center; min-height:44px; padding:0 14px; border:1px solid var(--edge); border-radius:999px; text-decoration:none; font-size:.8125rem; font-weight:600 }
.faq-nav a:hover { background:var(--panel2) }
.faq-page section { margin-top:34px }
.faq-page section>h2 { margin-bottom:10px; font-size:1.375rem }
.faq-page details { border:1px solid var(--line); border-radius:14px; background:var(--panel); margin-top:10px; padding:0 18px }
.faq-page summary { display:flex; align-items:center; justify-content:space-between; gap:12px; min-height:56px; cursor:pointer; font-weight:650; font-size:1rem; list-style:none }
.faq-page summary::-webkit-details-marker { display:none }
.faq-page summary:after { content:'+'; color:var(--accent-ink); font-size:1.375rem; font-weight:400; flex:0 0 auto }
.faq-page details[open] summary:after { content:'–' }
.faq-page details p,.faq-page details li { color:var(--muted); font-size:.9375rem; line-height:1.7 }
.faq-page details p:last-child,.faq-page details ul:last-child { margin-bottom:18px }
.faq-page details ul { padding-left:20px; margin-top:0 }
.faq-page details strong { color:var(--text) }

@media (max-width:56.25em) {
  .deposit-card { grid-template-columns:minmax(0,1fr) }
  .earn-panel { border-left:0; border-top:1px solid var(--line) }
  .position-stats { grid-template-columns:minmax(0,1fr); gap:14px }
  .position-top { flex-direction:column; gap:10px }
}
@media (max-width:40em) {
  .app-header { flex-wrap:wrap; gap:0 12px; padding:8px 16px 0 }
  .app-header nav { order:3; width:100%; overflow-x:auto }
  .app-header nav a { flex:1; justify-content:center; min-height:48px }
  .app-main { padding:20px 16px 56px }
  .deposit-steps,.earn-panel { padding:20px 16px }
  .term-presets { grid-auto-flow:row; grid-template-columns:repeat(3,minmax(0,1fr)) }
  .amount-box input[type=text] { font-size:1.625rem }
  .pool-cards,.portfolio-totals { grid-template-columns:minmax(0,1fr) }
  .contract-row { flex-direction:column; align-items:flex-start; gap:2px }
  .contract-row code { text-align:left; flex-wrap:wrap }
  .section-heading { flex-wrap:wrap }
  .banner { flex-direction:column; align-items:flex-start }
  dialog { margin:auto 0 0; width:100vw; max-width:100vw; max-height:92dvh; border-radius:20px 20px 0 0; padding:20px 16px }
  .step-row { grid-template-columns:1.75rem minmax(0,1fr) }
  .step-status { grid-column:2; text-align:left; max-width:none }
  .review-line { flex-direction:column; gap:2px }
  .review-line strong { text-align:left }
  .faq-page { padding:24px 16px 56px }
  .hero-copy { font-size:1rem }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto }
  *,*:before,*:after { transition:none!important; animation:none!important }
  .spinner { border-top-color:var(--line); border-right-color:var(--accent) }
}

#pending-detail { overflow-wrap:anywhere }
#position-lookup:not([hidden]) { display:flex; align-items:center; gap:.6rem; flex-wrap:wrap; margin-block:1rem }
#lookup-id { width:10rem; max-width:100%; background:var(--panel); color:var(--text); border:1px solid var(--edge); border-radius:8px; padding:.5rem }
#position-progress:empty { display:none }

/* User guide */
.user-guide .guide-steps {
  margin: 0;
  padding-inline-start: 1.5rem;
}
.guide-steps li { padding-inline-start: .35rem; margin-block: .75rem; color: var(--muted) }
.guide-steps li::marker { color: var(--accent-ink); font-weight: 700 }
.user-guide p strong, .guide-steps strong { color: var(--text) }
.user-guide figure { margin: 1.25rem 0 1.75rem }
.user-guide figure a { display: block; width: fit-content; max-width: 100% }
.user-guide figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px }
.user-guide figcaption { margin-top: .45rem; color: var(--muted); font-size: .875rem }
