/* 18 October first-deposit layout in the look of shadcn/ui: style nova, base colour
 * neutral, light only. Plain CSS: the values are shadcn's (CLI 4.22.0, base-nova
 * registry, neutral tokens); the dapp has no React or Tailwind.
 * Default view only: every rule is scoped to body.fd-view (set inline in app.html,
 * absent in ?view=plan), except the two plan-view guards at the end.
 * A hide whose replacement only first-deposit.js provides also waits for its
 * body[data-eiko-position] marker, so a page whose adapter 404s or never mounts
 * keeps the Deposit/Withdraw buttons, panel close, asset pills and theme toggle.
 * Presentation only: the engine still owns every value and visibility toggle.
 */

/* ---------- Tokens ---------- */
body.fd-view {
    --fd-width: 640px;
    /* shadcn neutral (light) */
    --sc-background: oklch(1 0 0);
    --sc-foreground: oklch(0.145 0 0);
    --sc-card: oklch(1 0 0);
    --sc-card-foreground: oklch(0.145 0 0);
    --sc-primary: oklch(0.205 0 0);
    --sc-primary-foreground: oklch(0.985 0 0);
    --sc-secondary: oklch(0.97 0 0);
    --sc-secondary-foreground: oklch(0.205 0 0);
    --sc-muted: oklch(0.97 0 0);
    --sc-muted-foreground: oklch(0.556 0 0);
    --sc-destructive: oklch(0.577 0.245 27.325);
    --sc-border: oklch(0.922 0 0);
    --sc-input: oklch(0.922 0 0);
    --sc-ring: oklch(0.708 0 0);
    --sc-chart-1: oklch(0.87 0 0);
    --sc-chart-3: oklch(0.439 0 0);
    /* Gain mirrors destructive's family (Tailwind red-600) one step darker for contrast: green-700. */
    --sc-gain: oklch(0.527 0.154 150.069);
    --sc-shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --sc-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --sc-ring-3: 3px solid color-mix(in oklab, var(--sc-ring) 50%, transparent);
    --sc-font-sans: 'Geist', ui-sans-serif, system-ui, sans-serif;
    --sc-font-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    /* Lucide chevron-down, drawn once and used as a mask everywhere (select needs a coloured copy). */
    --sc-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    /* Eiko's own tokens, re-pointed so the Market tab and engine-rendered parts follow. */
    --bg-primary: var(--sc-background);
    --bg-secondary: var(--sc-muted);
    --bg-card: var(--sc-card);
    --bg-card-hover: var(--sc-muted);
    --accent: var(--sc-primary);
    --accent-light: color-mix(in oklab, var(--sc-primary) 80%, transparent);
    --accent-dark: color-mix(in oklab, var(--sc-primary) 80%, transparent);
    --accent-soft: var(--sc-muted);
    --accent-glow: transparent;
    --accent-rgb: 23, 23, 23;
    --on-accent: var(--sc-primary-foreground);
    --bg-primary-rgb: 255, 255, 255;
    --text-primary: var(--sc-foreground);
    --text-secondary: var(--sc-muted-foreground);
    --text-secondary-rgb: 115, 115, 115;
    --text-muted: var(--sc-muted-foreground);
    --border: var(--sc-border);
    --border-light: var(--sc-input);
    --success: var(--sc-gain);
    --success-rgb: 0, 130, 54;
    --danger: var(--sc-destructive);
    --danger-rgb: 231, 0, 11;
    /* A warning (e.g. high price impact) is not a failure: Tailwind amber-600. */
    --warning: oklch(0.666 0.179 58.318);
    --warning-rgb: 225, 113, 0;
    --returns-gain: var(--sc-gain);
    --returns-loss: var(--sc-destructive);
    --gradient-brand: var(--sc-primary);
    --gradient-soft: var(--sc-muted);
    --shadow-sm: var(--sc-shadow-sm);
    --shadow-md: var(--sc-shadow-md);
    --shadow-lg: var(--sc-shadow-md);
    --shadow-glow: none;
    --radius: 10px;
    --radius-sm: 8px;
    --radius-lg: 14px;
    --font-body: var(--sc-font-sans);
    --font-display: var(--sc-font-sans);
    --font-mono: var(--sc-font-mono);
    background: var(--sc-background);
    color: var(--sc-foreground);
    font-family: var(--sc-font-sans);
}

/* ---------- Shell: no sidebar, tabs in the top bar ---------- */
body.fd-view .alpha-sidebar,
body.fd-view .alpha-intro,
body.fd-view[data-eiko-position] #alpha-theme-toggle { display: none; }
body.fd-view .main-content { margin-left: auto; margin-right: auto; }
/* content-box: the cap is the grid width and the page padding sits outside it. */
body.fd-view .main-content:has(> #vault-tab.active) { box-sizing: content-box; max-width: var(--fd-width); }

body.fd-view .header { min-height: 0; padding: 12px 32px; gap: 8px 24px; justify-content: flex-start; flex-wrap: wrap; border-bottom: 1px solid var(--sc-border); background: var(--sc-background); box-shadow: none; }
body.fd-view .header .wallet-container { margin-left: auto; gap: 8px; }
/* Vault / Market: ghost nav buttons (the in-card switches are Tabs). */
body.fd-view .header #tab-nav { display: flex; gap: 4px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; }
body.fd-view .header .tab-btn { flex: none; gap: 6px; min-height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--sc-muted-foreground); font-family: var(--sc-font-sans); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; box-shadow: none; }
body.fd-view .header .tab-btn i { display: none; }
body.fd-view .header .tab-btn:hover,
body.fd-view .header .tab-btn.active { background: var(--sc-muted); color: var(--sc-foreground); box-shadow: none; }
/* Button default */
body.fd-view #connect-wallet { min-height: 32px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: var(--sc-primary); color: var(--sc-primary-foreground); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; box-shadow: none; }
body.fd-view #connect-wallet:hover { background: color-mix(in oklab, var(--sc-primary) 80%, transparent); box-shadow: none; }
body.fd-view #connect-wallet:active { transform: translateY(1px); }
body.fd-view .header .wallet-info { gap: 8px; padding: 0; border: 0; border-radius: 0; background: transparent; }
/* Badge secondary */
body.fd-view .header #network-badge { display: inline-flex; align-items: center; height: 20px; padding: 2px 8px; border: 1px solid transparent; border-radius: 26px; background: var(--sc-secondary); color: var(--sc-secondary-foreground); font-size: 12px; line-height: calc(16 / 12); font-weight: 500; }
body.fd-view .header #wallet-address { color: var(--sc-muted-foreground); font-family: var(--sc-font-mono); font-size: 12px; }
/* Button ghost, size icon */
body.fd-view .header #disconnect-wallet { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 32px; padding: 0; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--sc-foreground); font-size: 16px; }
body.fd-view .header #disconnect-wallet:hover { background: var(--sc-muted); color: var(--sc-foreground); }

/* Focus ring (ring-3 ring-ring/50), drawn as an outline so component box-shadows cannot hide it.
 * Unfocused controls already carry the ring colour (shadcn's base layer: outline-color ring/50),
 * so a control's transition grows the ring in that colour, never from its dark currentColor.
 * Classes only in these scopes: an id would outrank the amount input's outline:none (double ring). */
body.fd-view :is(.header, .alpha-selection, .fd-layout, .site-footer) :is(button, select, summary, a, input),
body.fd-view .fd-deposit .input-with-max,
body.fd-view .wrong-chain-banner button { outline-color: color-mix(in oklab, var(--sc-ring) 50%, transparent); }
body.fd-view :is(.header, .alpha-selection, .fd-layout, .site-footer) :is(button, select, summary, a, input):focus-visible,
body.fd-view .wrong-chain-banner button:focus-visible { outline: var(--sc-ring-3); outline-offset: 0; }

/* ---------- Two-column Vault grid ---------- */
body.fd-view .fd-layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; max-width: var(--fd-width); margin: 0 auto; }
body.fd-view .fd-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
/* Card: nova draws its 1px edge as ring-1 ring-foreground/10, with no border and no other shadow. */
body.fd-view .fd-deposit,
body.fd-view .fd-side > .alpha-position,
body.fd-view #fd-results,
body.fd-view #vault-details { min-width: 0; margin: 0; padding: 16px; border: 0; border-radius: 14px; background: var(--sc-card); color: var(--sc-card-foreground); box-shadow: 0 0 0 1px color-mix(in oklab, var(--sc-foreground) 10%, transparent); font-size: 14px; line-height: calc(20 / 14); }
/* CardTitle */
body.fd-view .fd-deposit .panel-header h3,
body.fd-view .fd-side > .alpha-position .details-header h2,
body.fd-view #fd-results-title,
body.fd-view #vault-details > summary { margin: 0; color: var(--sc-card-foreground); font-family: var(--sc-font-sans); font-size: 16px; line-height: 1.375; font-weight: 500; letter-spacing: 0; }

/* ---------- Deposit card: picker ---------- */
body.fd-view .fd-deposit > .alpha-selection { margin: 0 0 16px; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--sc-border); border-radius: 0; background: transparent; }
body.fd-view .fd-deposit .alpha-selection > h2,
body.fd-view[data-eiko-position] #asset-tabs { display: none; }
/* Select trigger over a native <select>: the OS menu still opens. */
body.fd-view #asset-select { display: block; width: 100%; min-height: 32px; margin: 0 0 16px; padding: 0 30px 0 10px; border: 1px solid var(--sc-input); border-radius: 10px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 16px 16px; color: var(--sc-foreground); font-family: var(--sc-font-sans); font-size: 16px; line-height: calc(20 / 14); font-weight: 400; box-shadow: none; cursor: pointer; -webkit-appearance: none; appearance: none; }
/* Label */
body.fd-view .fd-deposit .alpha-selection .strike-label { color: var(--sc-foreground); font-size: 14px; line-height: 1; font-weight: 500; letter-spacing: 0; text-transform: none; }
/* Spot sits at the right end of the strike label line, so the pills get the card's full width
 * (long labels such as $0.0085 do not fit beside it at 1.35fr). It stays inside
 * #series-selector-container, whose display the engine owns. */
body.fd-view .fd-deposit .strike-picker-separated { --strike-min-width: 48px; --strike-control-gap: 8px; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 12px; }
body.fd-view .fd-deposit .strike-picker-separated > .strike-label { grid-column: 1; grid-row: 1; }
/* Badge secondary, mono figure */
body.fd-view .fd-deposit .strike-picker-separated > .spot-pill { grid-column: 2; grid-row: 1; justify-self: end; gap: 4px; min-height: 0; height: 20px; margin: 0; padding: 2px 8px; border: 1px solid transparent; border-radius: 26px; background: var(--sc-secondary); color: var(--sc-secondary-foreground); font-size: 12px; line-height: calc(16 / 12); font-weight: 500; letter-spacing: 0; text-transform: none; white-space: nowrap; }
body.fd-view .fd-deposit .spot-pill strong { color: inherit; font-family: var(--sc-font-mono); font-size: 12px; font-weight: 500; }
body.fd-view .fd-deposit .strike-picker-separated > .strike-pill-group { grid-column: 1 / -1; grid-row: 2; max-width: none; }
/* ToggleGroup, outline variant: selected = bg-muted (aria-pressed). */
body.fd-view .fd-deposit .strike-pill { gap: 4px; min-width: 32px; min-height: 32px; padding: 0 8px; border: 1px solid var(--sc-input); border-radius: 10px; background: transparent; color: var(--sc-foreground); font-family: var(--sc-font-sans); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; box-shadow: none; }
body.fd-view .fd-deposit .strike-pill:hover { background: var(--sc-muted); color: var(--sc-foreground); box-shadow: none; }
/* The selected strike is Button default (primary fill), one look in the Vault card and the Market
 * picker; hover on it is nova's primary/80, so a hovered pill never looks like a second selection. */
body.fd-view .alpha-selection .strike-pill.active,
body.fd-view .alpha-selection .strike-pill[aria-pressed="true"] { border-color: transparent; background: var(--sc-primary); color: var(--sc-primary-foreground); box-shadow: none; }
body.fd-view .alpha-selection .strike-pill.active:hover,
body.fd-view .alpha-selection .strike-pill[aria-pressed="true"]:hover { background: color-mix(in oklab, var(--sc-primary) 80%, transparent); color: var(--sc-primary-foreground); }
/* Badge outline, compact, on the value's line: a retired strike's pill stays as tall as the
 * others. While one shows, tracks size to content (minmax(min, auto)) so it fits beside its value. */
body.fd-view .fd-deposit .strike-pill { flex-wrap: nowrap; }
body.fd-view .fd-deposit .strike-pill-group:has(> .strike-pill:not([hidden]) .strike-badge) { grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--strike-min-width)), auto)); }
body.fd-view .fd-deposit .strike-pill .strike-badge { display: inline-flex; align-items: center; flex: none; height: 16px; padding: 0 4px; border: 1px solid var(--sc-border); border-radius: 26px; background: transparent; color: var(--sc-foreground); font-size: 12px; line-height: 1; font-weight: 500; letter-spacing: 0; }
/* On the selected (dark) fill the OFF badge becomes Badge secondary, so it stays legible. */
body.fd-view .alpha-selection .strike-pill.active .strike-badge,
body.fd-view .alpha-selection .strike-pill[aria-pressed="true"] .strike-badge { border-color: transparent; background: var(--sc-secondary); color: var(--sc-secondary-foreground); }

/* ---------- Deposit card: status, switch, open panel ---------- */
body.fd-view .fd-status { margin: 0; padding: 0; color: var(--sc-muted-foreground); font-size: 14px; line-height: calc(20 / 14); }
body.fd-view .fd-deposit .action-section { margin: 0; }
/* Tabs: the switch shows with a position, and whenever Withdraw is open (the way back).
 * Hidden only once the adapter mounted (it opens the box); the "has" reveal ties this
 * selector's specificity and wins by coming after it. */
body.fd-view[data-eiko-position] .action-buttons { display: none; }
body.fd-view[data-eiko-position="has"] .action-buttons,
body.fd-view .fd-deposit:has(#withdraw-panel:not([style*="none"])) .action-buttons { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 16px; }
/* Single/Dual and the withdraw "Receive as" choice share the same Tabs look. Plain selector
 * lists (no :is) keep each selector's own weight, so the disabled rules below still win. */
body.fd-view .action-buttons,
body.fd-view .deposit-mode-toggle,
body.fd-view .fd-deposit .token-selector { gap: 0; height: 32px; padding: 3px; border: 0; border-radius: 10px; background: var(--sc-muted); color: var(--sc-muted-foreground); }
body.fd-view .deposit-mode-toggle,
body.fd-view .fd-deposit .token-selector { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
body.fd-view .action-buttons .btn-action,
body.fd-view .deposit-mode-toggle .mode-btn,
body.fd-view .fd-deposit .token-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; width: 100%; height: calc(100% - 1px); min-height: 0; padding: 2px 6px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: color-mix(in oklab, var(--sc-foreground) 60%, transparent); font-family: var(--sc-font-sans); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; white-space: nowrap; box-shadow: none; opacity: 1; }
body.fd-view .action-buttons .btn-action i { display: none; }
body.fd-view .action-buttons .btn-action:hover,
body.fd-view .deposit-mode-toggle .mode-btn:hover,
body.fd-view .fd-deposit .token-btn:hover { background: transparent; color: var(--sc-foreground); box-shadow: none; opacity: 1; }
body.fd-view .action-buttons .btn-action.active,
body.fd-view .deposit-mode-toggle .mode-btn.active,
body.fd-view .fd-deposit .token-btn.active { background: var(--sc-background); color: var(--sc-foreground); box-shadow: var(--sc-shadow-sm); }
/* A closed entry gate disables the Deposit segment (and the confirm): disabled = opacity .5. */
body.fd-view .fd-deposit :is(.action-buttons, .panel-actions) .btn-action:disabled { opacity: .5; pointer-events: none; }
body.fd-view .fd-deposit .venue-control:disabled > .btn-action { font-size: 0; }
body.fd-view .fd-deposit .venue-control:disabled > .btn-action::after { font-size: 14px; }

body.fd-view .fd-deposit .action-panel { overflow: visible; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; animation: none; }
body.fd-view .fd-deposit .panel-header { padding: 0 0 16px; border: 0; }
body.fd-view .fd-deposit .panel-body { padding: 0; }
body.fd-view[data-eiko-position] #deposit-panel .btn-close,
body.fd-view[data-eiko-position] #withdraw-panel .btn-close,
body.fd-view[data-eiko-position] #deposit-panel .panel-actions > button[onclick="hideActionPanels()"],
body.fd-view[data-eiko-position] #withdraw-panel .panel-actions > button[onclick="hideActionPanels()"],
body.fd-view #deposit-single-mode > .panel-description,
body.fd-view #deposit-single-mode > .token-selector { display: none; }
body.fd-view .fd-deposit .panel-description { margin: 0 0 8px; color: var(--sc-muted-foreground); font-size: 14px; line-height: calc(20 / 14); }

/* Field: Label, 8px, Input */
body.fd-view .fd-deposit :is(.input-group, .slider-group) { gap: 8px; }
body.fd-view .fd-deposit :is(.input-group, .slider-group) > label { margin: 0; color: var(--sc-foreground); font-size: 14px; line-height: 1; font-weight: 500; }
/* Input, with a ghost xs MAX inside */
body.fd-view .fd-deposit .input-with-max { align-items: center; border: 1px solid var(--sc-input); border-radius: 10px; background: transparent; }
body.fd-view .fd-deposit .input-with-max:focus-within { border-color: var(--sc-ring); outline: var(--sc-ring-3); }
body.fd-view .fd-deposit .input-with-max input { min-height: 30px; padding: 4px 10px; border: 0; background: transparent; color: var(--sc-foreground); font-family: var(--sc-font-sans); font-size: 16px; line-height: 1.5; }
body.fd-view .fd-deposit .input-with-max input::placeholder { color: var(--sc-muted-foreground); }
body.fd-view .fd-deposit .input-with-max input:focus-visible { outline: none; }
body.fd-view .fd-deposit .btn-max { min-width: 0; min-height: 24px; margin: 0 3px; padding: 0 8px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--sc-foreground); font-size: 12px; line-height: calc(16 / 12); font-weight: 500; }
body.fd-view .fd-deposit .btn-max:hover { background: var(--sc-muted); }
body.fd-view .fd-deposit .input-balance { color: var(--sc-muted-foreground); font-size: 12px; line-height: calc(16 / 12); }
body.fd-view .fd-deposit .settlement-note { margin: 8px 0 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--sc-muted-foreground); font-size: 14px; font-style: normal; line-height: calc(20 / 14); }
body.fd-view .fd-deposit select { width: 100%; min-height: 32px; padding: 0 30px 0 10px; border: 1px solid var(--sc-input); border-radius: 10px; background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23737373' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 8px center / 16px 16px; color: var(--sc-foreground); font-size: 16px; -webkit-appearance: none; appearance: none; }
body.fd-view .fd-deposit input[type="range"] { accent-color: var(--sc-primary); }

/* Key/value block: rounded-lg bg-muted/50 p-3, label muted, figure mono */
body.fd-view .fd-deposit .input-row { gap: 16px; margin: 0; }
body.fd-view .fd-deposit :is(.preview-box, .position-summary, .ratio-display) { margin: 16px 0 0; padding: 12px; border: 0; border-radius: 10px; background: color-mix(in oklab, var(--sc-muted) 50%, transparent); font-size: 14px; line-height: calc(20 / 14); }
body.fd-view .fd-deposit .ratio-display { margin: 8px 0 16px; }
body.fd-view .fd-deposit :is(.preview-row, .summary-row) { gap: 8px; padding: 0; border: 0; font-size: 14px; }
body.fd-view .fd-deposit :is(.preview-row, .summary-row) + :is(.preview-row, .summary-row) { margin-top: 8px; }
body.fd-view .fd-deposit :is(.preview-row, .summary-row, .ratio-display) > :first-child { color: var(--sc-muted-foreground); }
body.fd-view .fd-deposit :is(.preview-row, .summary-row, .ratio-display) > :last-child { color: var(--sc-foreground); font-family: var(--sc-font-mono); }
body.fd-view .fd-deposit .preview-row.highlight > :last-child { font-weight: 500; }
body.fd-view .fd-deposit .preview-section-label { margin: 0 0 8px; padding: 0; border: 0; color: var(--sc-muted-foreground); font-size: 12px; line-height: calc(16 / 12); font-weight: 500; letter-spacing: 0; text-transform: none; }
body.fd-view #withdraw-panel > .panel-body > .preview-section-label { margin-top: 16px; }
body.fd-view .fd-deposit .quote-refresh-indicator { margin-top: 8px; padding-top: 8px; color: var(--sc-muted-foreground); font-size: 12px; font-style: normal; }
body.fd-view #withdraw-panel .token-selector { margin-bottom: 16px; }
body.fd-view .fd-deposit .slider-labels { color: var(--sc-muted-foreground); font-size: 12px; }

/* Weekly limit: separator, outline Refresh, muted lines, a failure in destructive tone */
body.fd-view #withdrawal-limit { margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--sc-border); font-size: 14px; line-height: calc(20 / 14); }
body.fd-view #withdrawal-limit button { min-height: 28px; padding: 0 10px; border: 1px solid var(--sc-border); border-radius: 8px; background: var(--sc-background); color: var(--sc-foreground); font-size: 12.8px; font-weight: 500; }
body.fd-view #withdrawal-limit button:hover { background: var(--sc-muted); }
body.fd-view #withdrawal-limit :is([data-limit-scope], [data-limit-reset], details) { color: var(--sc-muted-foreground); font-size: 12px; opacity: 1; }
body.fd-view #withdrawal-limit [data-limit-error]:not(:empty) { color: var(--sc-destructive); font-weight: 500; }

/* Button default, size lg, full width */
body.fd-view .fd-deposit .panel-actions { display: flex; gap: 0; margin-top: 16px; }
body.fd-view .fd-deposit .panel-actions .btn-action { flex: 1 1 100%; gap: 6px; width: 100%; min-height: 36px; padding: 0 10px; border: 1px solid transparent; border-radius: 10px; background: var(--sc-primary); color: var(--sc-primary-foreground); font-family: var(--sc-font-sans); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; white-space: nowrap; box-shadow: none; }
body.fd-view .fd-deposit .panel-actions .btn-action:hover { background: color-mix(in oklab, var(--sc-primary) 80%, transparent); box-shadow: none; }
body.fd-view .fd-deposit .panel-actions .btn-action:active { transform: translateY(1px); }

/* ---------- Accordion: one right-hand chevron for every disclosure ---------- */
body.fd-view :is(#deposit-more-options, #write-options-disclosure, #vault-details, #vault-details details, #fd-results .accum-breakdown, #withdrawal-limit details) > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 40px; list-style: none; cursor: pointer; text-underline-offset: 4px; }
body.fd-view :is(#deposit-more-options, #write-options-disclosure, #vault-details, #vault-details details, #fd-results .accum-breakdown, #withdrawal-limit details) > summary::-webkit-details-marker { display: none; }
body.fd-view :is(#deposit-more-options, #write-options-disclosure, #vault-details, #vault-details details, #fd-results .accum-breakdown, #withdrawal-limit details) > summary > i,
body.fd-view #fd-results .accum-breakdown > summary::before { display: none; }
body.fd-view :is(#deposit-more-options, #write-options-disclosure, #vault-details, #vault-details details, #fd-results .accum-breakdown, #withdrawal-limit details) > summary:hover { text-decoration: underline; }
body.fd-view :is(#deposit-more-options, #write-options-disclosure, #vault-details, #vault-details details, #fd-results .accum-breakdown, #withdrawal-limit details) > summary::after { content: ''; flex: none; width: 16px; height: 16px; margin-left: auto; background: var(--sc-muted-foreground); -webkit-mask: var(--sc-chevron) center / 16px 16px no-repeat; mask: var(--sc-chevron) center / 16px 16px no-repeat; }
body.fd-view :is(#deposit-more-options, #write-options-disclosure, #vault-details, #vault-details details, #fd-results .accum-breakdown, #withdrawal-limit details)[open] > summary::after { transform: rotate(180deg); }
/* Trigger: py-2.5, text-sm, font-medium */
body.fd-view :is(#deposit-more-options, #write-options-disclosure, #vault-details details) > summary { padding: 10px 0; border-radius: 0; background: transparent; color: var(--sc-foreground); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; }

/* More options: an accordion under a separator */
body.fd-view #deposit-more-options { margin: 16px 0 0; border-top: 1px solid var(--sc-border); }
body.fd-view #deposit-more-options[open] { padding-bottom: 10px; }
body.fd-view #deposit-more-options .deposit-mode-toggle { margin: 0; }
body.fd-view #deposit-more-options .write-options-box { margin: 16px 0 0; padding: 0; border: 0; border-top: 1px solid var(--sc-border); border-radius: 0; background: transparent; }
body.fd-view #write-options-disclosure .write-options-hint { color: var(--sc-muted-foreground); font-size: 12px; font-weight: 400; }
body.fd-view #write-options-disclosure .write-options-body { gap: 16px; margin: 0; padding: 0 0 10px; }
body.fd-view #write-options-disclosure .write-options-description { color: var(--sc-muted-foreground); font-size: 14px; line-height: calc(20 / 14); }
body.fd-view #write-options-disclosure :is(.write-preview-empty, .write-side-label, .write-fraction-value, .write-preview-fill) { padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--sc-muted-foreground); font-size: 12px; font-style: normal; text-align: left; }

/* ---------- Right column: position ---------- */
body.fd-view[data-eiko-position="none"] .alpha-position { display: none; }
/* updatePositionDisplay writes an inline display on #no-position; only !important can win. */
body.fd-view #no-position { display: none !important; }
body.fd-view .fd-side > .alpha-position .details-header { gap: 4px; margin-bottom: 16px; }
/* Button size sm: ghost (Retry, About), ghost icon-sm (refresh), outline (Position card) */
body.fd-view .fd-side > .alpha-position .btn-refresh { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 28px; min-height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--sc-foreground); font-size: 12.8px; line-height: calc(16 / 12); font-weight: 500; }
body.fd-view .fd-side > .alpha-position .btn-refresh[aria-label] { padding: 0; font-size: 14px; }
body.fd-view .fd-side > .alpha-position #position-card-actions .btn-refresh,
body.fd-view .fd-side > .alpha-position .returns-header-actions .btn-refresh:not(.returns-help-button) { border-color: var(--sc-border); background: var(--sc-background); }
body.fd-view .fd-side > .alpha-position .btn-refresh:hover { background: var(--sc-muted); color: var(--sc-foreground); }
body.fd-view .fd-side > .alpha-position .btn-refresh:disabled { opacity: .5; pointer-events: none; }
/* Load status: a muted line; the failed read reads in destructive tone. */
body.fd-view .fd-side > .alpha-position .position-loading-state { padding: 0 0 16px; text-align: left; }
body.fd-view .fd-side > .alpha-position .position-loading-icon { display: none; }
body.fd-view .fd-side > .alpha-position .position-loading-state > :is(p, span) { display: block; margin: 0; color: var(--sc-muted-foreground); font-size: 14px; font-weight: 400; line-height: calc(20 / 14); }
body.fd-view .fd-side > .alpha-position .position-loading-state:has(.bi-exclamation-triangle) > p { color: var(--sc-destructive); }
body.fd-view .fd-side > .alpha-position .position-header { margin-bottom: 4px; }
body.fd-view .fd-side > .alpha-position .position-label { color: var(--sc-muted-foreground); font-size: 14px; line-height: calc(20 / 14); }
body.fd-view .fd-side > .alpha-position .holding-target { margin: 0 0 12px; color: var(--sc-foreground); font-family: var(--sc-font-sans); font-size: 16px; line-height: 1.375; font-weight: 500; font-variant-numeric: tabular-nums; }
body.fd-view .fd-side > .alpha-position .holding-value { color: var(--sc-foreground); font-family: var(--sc-font-mono); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; }
body.fd-view .fd-side > .alpha-position :is(.holding-label, .holding-divider) { color: var(--sc-muted-foreground); font-size: 12px; }
body.fd-view .fd-side > .alpha-position .position-details > .position-card + .position-card,
body.fd-view .fd-side > .alpha-position .gyro-earnings { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--sc-border); }
body.fd-view .fd-side > .alpha-position .returns-header-actions { gap: 4px; }
body.fd-view .fd-side > .alpha-position .returns-value { margin: 4px 8px 0 0; font-family: var(--sc-font-mono); font-size: 16px; line-height: 1.375; font-weight: 500; }
body.fd-view .fd-side > .alpha-position .returns-percent { font-family: var(--sc-font-mono); font-size: 14px; }
body.fd-view .fd-side > .alpha-position .gyro-earnings p { color: var(--sc-muted-foreground); font-size: 14px; }

/* ---------- Right column: Results ---------- */
/* CardDescription */
body.fd-view .fd-results-note { margin: 4px 0 0; color: var(--sc-muted-foreground); font-size: 14px; line-height: calc(20 / 14); }
body.fd-view #epoch-history { margin: 16px 0 0; padding: 0; border: 0; }
body.fd-view #epoch-history > summary { display: none; }
body.fd-view #epoch-history .unified-history-body { padding: 0; }
body.fd-view #fd-results .history-update-status { margin: 0; color: var(--sc-muted-foreground); font-size: 14px; line-height: calc(20 / 14); }
body.fd-view #fd-results .unified-epoch { border-bottom: 1px solid var(--sc-border); font-size: 14px; }
body.fd-view #fd-results .unified-epoch > time { color: var(--sc-muted-foreground); font-size: 14px; }
body.fd-view #fd-results .unified-epoch > strong { font-family: var(--sc-font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
body.fd-view #fd-results:not(.fd-expanded) .unified-epoch { grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: 0 8px; padding: 8px 0; }
body.fd-view #fd-results:not(.fd-expanded) .unified-epoch > strong { font-size: 14px; line-height: calc(20 / 14); }
body.fd-view #fd-results:not(.fd-expanded) .unified-epoch > p,
body.fd-view #fd-results:not(.fd-expanded) .epoch-source-tools,
body.fd-view #fd-results:not(.fd-expanded) .epoch-annual,
body.fd-view #fd-results:not(.fd-expanded) .unified-epoch-detail,
body.fd-view #fd-results:not(.fd-expanded) #epoch-history-refresh,
body.fd-view #fd-results:not(.fd-expanded) #epoch-history-list > :nth-child(n+6),
body.fd-view:is([data-eiko-position="has"], [data-eiko-position="unknown"]) #fd-results:not(.fd-expanded) #epoch-history-list > :nth-child(n+4) { display: none; }
/* A failed read keeps its retry: Refresh shows beside any settled status line. */
body.fd-view #fd-results:not(.fd-expanded) #epoch-history-status:not([hidden]):not([data-loading="true"]) ~ #epoch-history-refresh { display: inline-flex; }
/* The last VISIBLE row has no divider: 5 rows, 3 rows with a position, or all when expanded. */
body.fd-view #fd-results #epoch-history-list > :last-child,
body.fd-view #fd-results:not(.fd-expanded) #epoch-history-list > :nth-child(5),
body.fd-view:is([data-eiko-position="has"], [data-eiko-position="unknown"]) #fd-results:not(.fd-expanded) #epoch-history-list > :nth-child(3) { border-bottom: 0; }
body.fd-view #fd-results.fd-expanded .unified-epoch { padding: 12px 0; }
body.fd-view #fd-results.fd-expanded .unified-epoch > time { color: var(--sc-foreground); }
body.fd-view #fd-results.fd-expanded .unified-epoch > strong { justify-self: end; font-size: 16px; }
body.fd-view #fd-results .unified-epoch p,
body.fd-view #fd-results .epoch-annual { color: var(--sc-muted-foreground); font-size: 12px; }
body.fd-view #fd-results .unified-epoch a { color: var(--sc-foreground); font-size: 12px; font-weight: 500; text-underline-offset: 4px; }
body.fd-view #fd-results .unified-epoch a:hover { text-decoration: underline; }
body.fd-view #fd-results .epoch-source-info:hover,
body.fd-view #fd-results .epoch-source-info[aria-expanded="true"] { background: var(--sc-muted); color: var(--sc-foreground); }
body.fd-view #fd-results .epoch-source-glyph { font-size: 12px; }
/* The row's border-bottom is the only separator under "Where this came from". */
body.fd-view #fd-results .accum-breakdown { margin-top: 8px; padding: 0; border: 0; }
body.fd-view #fd-results .accum-breakdown > summary { padding: 0; color: var(--sc-muted-foreground); font-size: 12px; font-weight: 500; }
body.fd-view #fd-results :is(.accum-tr-row, .accum-tr-keep, .accum-tr-net) { font-size: 12px; }
body.fd-view #fd-results :is(.accum-tr-note, .accum-tr-drift, .accum-info) { font-size: 12px; }
/* Button outline */
body.fd-view #fd-results #epoch-history-refresh { align-items: center; justify-content: center; width: auto; min-height: 32px; margin: 16px 0 0; padding: 0 10px; border: 1px solid var(--sc-border); border-radius: 10px; background: var(--sc-background); color: var(--sc-foreground); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; box-shadow: none; }
body.fd-view #fd-results #epoch-history-refresh:hover { background: var(--sc-muted); }
/* Button link (px-0), right-aligned */
body.fd-view #fd-all-results { display: flex; align-items: center; min-height: 32px; margin: 8px 0 0 auto; padding: 0; border: 0; background: transparent; color: var(--sc-primary); font-family: var(--sc-font-sans); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; text-underline-offset: 4px; cursor: pointer; }
body.fd-view #fd-all-results:hover { text-decoration: underline; }
/* Only the adapter toggles it: without the adapter the button is hidden, not dead. */
body.fd-view:not([data-eiko-position]) #fd-all-results { display: none; }

/* ---------- Right column: Vault details (Card + Accordion) ---------- */
body.fd-view #vault-details { padding: 0; }
body.fd-view #vault-details > summary { padding: 16px; }
body.fd-view #vault-details[open] > summary { padding-bottom: 0; }
body.fd-view #vault-details > :not(summary) { margin: 0 16px; }
/* The last trigger's own py-2.5 plus this makes the card's 16px bottom spacing. */
body.fd-view #vault-details > :last-child { margin-bottom: calc(16px - 10px); }
body.fd-view #vault-details .visualizer-section { padding: 16px 0 0; text-align: left; }
body.fd-view #vault-details .accumulation-display { align-items: flex-start; }
body.fd-view #vault-details .accumulation-mode { justify-content: flex-start; gap: 6px; color: var(--sc-foreground); font-family: var(--sc-font-sans); font-size: 14px; font-weight: 500; }
body.fd-view #vault-details .mode-icon { font-size: 14px; }
body.fd-view #vault-details .accum-rollup { margin-top: 4px; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--sc-muted-foreground); font-family: var(--sc-font-sans); font-size: 14px; line-height: calc(20 / 14); font-weight: 400; }
body.fd-view #vault-details .alpha-explanation { margin: 16px 0 0; }
body.fd-view #vault-details .mode-why { margin: 0; padding: 0; color: var(--sc-muted-foreground); font-family: var(--sc-font-sans); font-size: 14px; line-height: calc(20 / 14); }
/* Accordion items: separators between, content pt-0 pb-2.5 */
body.fd-view #vault-details details { margin-top: 0; margin-bottom: 0; padding: 0; border: 0; border-top: 1px solid var(--sc-border); border-radius: 0; background: transparent; }
body.fd-view #vault-details details[open] { padding-bottom: 10px; }
body.fd-view #vault-details :is(.disclosure-body, .lp-content) { margin: 0; padding: 0; }
body.fd-view #vault-details .accum-note { color: var(--sc-muted-foreground); font-size: 12px; }
/* Strike & vault details: key/value groups */
body.fd-view #vault-details .status-section { gap: 0; margin: 0; }
body.fd-view #vault-details .status-card { padding: 12px 0; border: 0; border-top: 1px solid var(--sc-border); border-radius: 0; background: transparent; }
body.fd-view #vault-details .status-card:first-child { padding-top: 0; border-top: 0; }
body.fd-view #vault-details .status-card:hover { transform: none; background: transparent; }
body.fd-view #vault-details .status-header { margin-bottom: 4px; color: var(--sc-muted-foreground); font-size: 12px; }
body.fd-view #vault-details .status-header i { color: inherit; }
body.fd-view #vault-details .status-value { margin-bottom: 4px; color: var(--sc-foreground); font-family: var(--sc-font-mono); font-size: 16px; line-height: 1.375; font-weight: 500; }
body.fd-view #vault-details .status-detail { margin-bottom: 0; color: var(--sc-muted-foreground); font-size: 12px; line-height: calc(16 / 12); }
body.fd-view #vault-details .status-detail > :last-child,
body.fd-view #vault-details .status-detail .highlight,
body.fd-view #vault-details #price-distance { color: var(--sc-foreground); font-style: normal; }
body.fd-view #vault-details .epoch-progress { height: 4px; margin: 8px 0; background: var(--sc-muted); }
body.fd-view #vault-details .epoch-bar { background: var(--sc-primary); }
/* Badge outline; a stale keeper is Badge destructive. */
body.fd-view #vault-details :is(.keeper-health, .poke-preview-status) { display: inline-flex; align-items: center; height: 20px; padding: 2px 8px; border: 1px solid var(--sc-border); border-radius: 26px; background: transparent; color: var(--sc-foreground); font-size: 12px; line-height: calc(16 / 12); font-weight: 500; }
body.fd-view #vault-details .keeper-health.keeper-stale { border-color: transparent; background: color-mix(in oklab, var(--sc-destructive) 10%, transparent); color: var(--sc-destructive); }
body.fd-view #vault-details .poke-preview { justify-content: flex-start; font-size: 12px; }
body.fd-view #vault-details .poke-preview-detail { color: var(--sc-muted-foreground); }
/* Vault overview and Fee History figures: key/value blocks */
body.fd-view #vault-details .totals-banner { flex-direction: column; gap: 8px; margin: 0; }
body.fd-view #vault-details :is(.totals-banner-item, .fee-metric) { gap: 2px; padding: 12px; border: 0; border-radius: 10px; background: color-mix(in oklab, var(--sc-muted) 50%, transparent); box-shadow: none; text-align: left; }
body.fd-view #vault-details :is(.totals-banner-label, .fee-metric-label) { margin: 0; color: var(--sc-muted-foreground); font-size: 12px; line-height: calc(16 / 12); font-weight: 500; letter-spacing: 0; text-transform: none; }
body.fd-view #vault-details :is(.totals-banner-value, .fee-metric-value) { color: var(--sc-foreground); font-family: var(--sc-font-mono); font-size: 16px; line-height: 1.375; font-weight: 500; }
body.fd-view #vault-details :is(.totals-banner-sub, .fee-metric-note) { color: var(--sc-muted-foreground); font-size: 12px; font-style: normal; letter-spacing: 0; }
/* Two columns: four would not fit the 376px side column. */
body.fd-view #vault-details .fee-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 8px; }
/* LP gauge in chart tokens (neutral), no asset colours */
body.fd-view #vault-details .lp-visual { margin-bottom: 8px; padding: 12px; border-radius: 10px; background: color-mix(in oklab, var(--sc-muted) 50%, transparent); }
body.fd-view #vault-details :is(.tick-labels, .tick-legend, .tick-gap-caption) { font-size: 12px; }
body.fd-view #vault-details .tick-gauge { border-radius: 8px; border-color: var(--sc-border); }
body.fd-view #vault-details .tick-fill-usdc,
body.fd-view #vault-details .legend-usdc::before { background: var(--sc-chart-1); }
body.fd-view #vault-details .tick-fill-base,
body.fd-view #vault-details .legend-base::before { background: var(--sc-chart-3); }
body.fd-view #vault-details .tick-gap-badge { font-size: 12px; }
body.fd-view #vault-details .lp-stats .stat-row { padding: 0; font-size: 14px; }
body.fd-view #vault-details .lp-stats .stat-row > :last-child { color: var(--sc-foreground); font-family: var(--sc-font-mono); }
body.fd-view #vault-details :is(.fee-event-header, .fee-event-row, .fee-events) { font-size: 12px; letter-spacing: 0; text-transform: none; }
body.fd-view #vault-details .fee-event-row.fee-pending { border-bottom-color: var(--sc-border); color: var(--sc-foreground); }
body.fd-view #vault-details .fee-event-empty { font-size: 14px; font-style: normal; }
body.fd-view #vault-details #fee-history-status { margin: 0 0 8px; color: var(--sc-muted-foreground); font-size: 14px; }
/* Button outline */
body.fd-view #vault-details :is(#btn-poke, #recent-fees-refresh) { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; width: auto; min-width: 0; min-height: 32px; margin: 0; padding: 0 10px; border: 1px solid var(--sc-border); border-radius: 10px; background: var(--sc-background); color: var(--sc-foreground); font-size: 14px; line-height: calc(20 / 14); font-weight: 500; box-shadow: none; }
body.fd-view #vault-details :is(#btn-poke, #recent-fees-refresh):hover { background: var(--sc-muted); color: var(--sc-foreground); }

/* ---------- Banners: Alert (default; wrong network is destructive) ---------- */
body.fd-view :is(#paused-banner, #wrong-chain-banner) { justify-content: flex-start; gap: 8px; margin: 0 0 16px; padding: 8px 10px; border: 1px solid var(--sc-border); border-radius: 10px; background: var(--sc-card); box-shadow: none; color: var(--sc-card-foreground); font-size: 14px; line-height: calc(20 / 14); font-weight: 400; text-align: left; }
body.fd-view #paused-banner { flex-wrap: nowrap; align-items: flex-start; }
body.fd-view #paused-banner i { flex: none; font-size: 16px; line-height: 1; transform: translateY(2px); }
body.fd-view #wrong-chain-banner,
body.fd-view #wrong-chain-banner #wrong-chain-msg { color: var(--sc-destructive); font-weight: 500; }
body.fd-view #wrong-chain-banner #switch-chain-btn { min-height: 28px; padding: 0 10px; border: 1px solid transparent; border-radius: 8px; background: var(--sc-primary); color: var(--sc-primary-foreground); font-size: 12.8px; font-weight: 500; }

/* ---------- Footer: one row of text links ---------- */
body.fd-view .site-footer { box-sizing: content-box; max-width: var(--fd-width); margin: 8px auto 0; padding: 0 32px 32px; color: var(--sc-muted-foreground); font-size: 14px; }
body.fd-view:has(#market-tab.active) .site-footer { box-sizing: border-box; max-width: var(--app-content-width); }
body.fd-view .fd-footer-links { display: flex; flex-wrap: wrap; align-items: center; gap: 0 16px; }
body.fd-view #referral-actions { display: contents; }
body.fd-view .fd-footer-links :is(button, a) { display: inline-flex; align-items: center; min-width: 0; min-height: 32px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--sc-muted-foreground); font-family: var(--sc-font-sans); font-size: 14px; font-weight: 500; text-decoration: none; text-underline-offset: 4px; cursor: pointer; }
body.fd-view .fd-footer-links :is(button, a):hover { background: transparent; color: var(--sc-foreground); text-decoration: underline; }

/* ---------- Desktop: two columns ---------- */
@media (min-width: 1100px) {
    body.fd-view { --fd-width: 900px; }
    body.fd-view .fd-layout { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
    body.fd-view #asset-select { display: inline-block; width: auto; min-width: 200px; }
}

/* ---------- Input text: 16px below 768px (no iOS zoom), 14px from 768px (Input md:text-sm) ---------- */
@media (min-width: 768px) {
    body.fd-view #asset-select,
    body.fd-view .fd-deposit select,
    body.fd-view .fd-deposit .input-with-max input { font-size: 14px; }
    body.fd-view .fd-deposit .input-with-max input { line-height: calc(20 / 14); }
}

/* ---------- Below 1100px: tabs get their own row; every control is at least 40px ---------- */
@media (max-width: 1099.98px) {
    body.fd-view .header #tab-nav { order: 3; flex: 1 0 100%; }
    body.fd-view .header .tab-btn { flex: 1 1 0; }
    body.fd-view .header .tab-btn,
    body.fd-view #connect-wallet,
    body.fd-view #asset-select,
    body.fd-view .fd-deposit .strike-pill,
    body.fd-view .fd-deposit .input-with-max input,
    body.fd-view .fd-deposit .btn-max,
    body.fd-view .fd-deposit select,
    body.fd-view .fd-deposit .panel-actions .btn-action,
    body.fd-view #withdrawal-limit button,
    body.fd-view .fd-side > .alpha-position .btn-refresh,
    body.fd-view #fd-results #epoch-history-refresh,
    body.fd-view #fd-all-results,
    body.fd-view #vault-details :is(#btn-poke, #recent-fees-refresh),
    body.fd-view #wrong-chain-banner #switch-chain-btn,
    body.fd-view .fd-footer-links :is(button, a) { min-height: 40px; }
    body.fd-view .header #disconnect-wallet,
    body.fd-view .fd-side > .alpha-position .btn-refresh[aria-label] { min-width: 40px; min-height: 40px; }
    body.fd-view .fd-deposit .btn-max { margin: 0; border-radius: 0; }
    body.fd-view .action-buttons,
    body.fd-view .deposit-mode-toggle,
    body.fd-view .fd-deposit .token-selector { height: auto; }
    body.fd-view .action-buttons .btn-action,
    body.fd-view .deposit-mode-toggle .mode-btn,
    body.fd-view .fd-deposit .token-btn { height: auto; min-height: 40px; }
}
@media (max-width: 640px) {
    body.fd-view .header { padding: 10px 16px; column-gap: 12px; }
    body.fd-view .fd-deposit .strike-picker-separated { --strike-min-width: 44px; }
    body.fd-view .fd-deposit .strike-pill { padding: 0 2px; font-size: 12px; }
    body.fd-view .site-footer { padding: 0 16px 32px; }
}

/* ---------- Plan view guards (body.eiko-plan, no fd-view) ---------- */
/* The sidebar used to hide the tab nav in plan view; plan.css forces its own layout. */
body.eiko-plan #tab-nav { display: none !important; }
body.eiko-plan .fd-footer-links a[href="legacy.html"] { display: none; }
