.account-switch-link[type="button"] {
  min-height: 24px;
  padding: 0 var(--space-sm);
  color: var(--muted);
  background: transparent;
  border-color: transparent;
  border-radius: 4px;
  box-shadow: none;
  font-size: 9px;
  font-weight: 760;
}

body.hedging-mode .account-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  min-height: 0;
  padding: var(--space-md);
  align-items: start;
}

body.hedging-mode .account-actions {
  margin-left: 0;
}

body.hedging-mode #accountMetaValue,
body.hedging-mode #adminWsStatus {
  display: none;
}

.account-switch-link[type="button"].active {
  color: #2e1d07;
  background: var(--accent);
  border-color: rgba(255, 219, 166, 0.32);
}

.hedging-page {
  display: grid;
  gap: var(--space-md);
  min-width: 0;
  overflow: hidden;
}

.hedging-page-head,
.hedging-ticket-head,
.hedging-monitor-head,
.hedging-sessions-head,
.hedging-risk-head,
.hedging-leg-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-width: 0;
}

.hedging-title-block {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}

.hedging-title-block h2,
.hedging-ticket h3,
.hedging-monitor-summary h3,
.hedging-sessions-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.hedging-title-block p,
.hedging-monitor-note {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  text-wrap: pretty;
}

.hedging-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.hedging-config-pill,
.hedging-live-price,
.hedging-session-status,
.hedging-order-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--space-sm);
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 760;
  white-space: nowrap;
}

.hedging-config-pill[hidden] {
  display: none;
}

.hedging-config-pill.ready,
.hedging-session-status.active,
.hedging-order-status.filled {
  color: var(--good);
  background: var(--up-soft);
  border-color: var(--up-line);
}

.hedging-config-pill.disabled,
.hedging-session-status.warn,
.hedging-order-status.pending {
  color: var(--warn);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.hedging-config-pill.error,
.hedging-session-status.danger,
.hedging-order-status.failed {
  color: var(--danger);
  background: var(--down-soft);
  border-color: var(--down-line);
}

.hedging-account-overview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #151814;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xs);
}

.hedging-account-overview[hidden] {
  display: none;
}

.hedging-account-overview-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 0;
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.hedging-account-overview-card + .hedging-account-overview-card {
  border-left: 1px solid var(--line-soft);
}

.hedging-account-overview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  min-height: 58px;
  min-width: 0;
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}

.hedging-account-overview-head > div {
  min-width: 0;
}

.hedging-account-overview-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 13px;
}

.hedging-account-overview-head small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hedging-account-config {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 var(--space-sm);
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 760;
  white-space: nowrap;
}

.hedging-account-config.ready {
  color: var(--good);
  background: var(--up-soft);
  border-color: var(--up-line);
}

.hedging-account-config.disabled,
.hedging-account-config.loading {
  color: var(--warn);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.hedging-account-config.error {
  color: var(--danger);
  background: var(--down-soft);
  border-color: var(--down-line);
}

.hedging-account-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.hedging-account-metrics > div {
  min-width: 0;
  padding: var(--space-sm);
  min-height: 42px;
  background: transparent;
  border-right: 1px solid var(--line-soft);
  border-bottom: 0;
}

.hedging-account-metrics > div:last-child {
  border-right: 0;
}

.hedging-account-metrics span,
.hedging-account-metrics strong,
.hedging-account-metrics small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hedging-account-metrics span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
}

.hedging-account-metrics strong {
  margin-top: 3px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 760;
}

.hedging-account-metrics small {
  margin-top: 3px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 7px;
}

.hedging-account-metrics .equity strong {
  color: var(--warn);
}

.hedging-account-metrics .warn strong {
  color: var(--warn);
}

.hedging-account-metrics .danger strong {
  color: var(--danger);
}

.hedging-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.45fr);
  gap: var(--space-sm);
  align-items: stretch;
}

.hedging-ticket,
.hedging-monitor-summary {
  min-width: 0;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.hedging-ticket {
  display: grid;
  gap: var(--space-md);
}

.hedging-ticket > summary {
  list-style: none;
  cursor: pointer;
}

.hedging-ticket > summary::-webkit-details-marker {
  display: none;
}

.hedging-ticket > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
}

.hedging-ticket[open] > summary::after {
  content: "−";
}

.hedging-ticket-body {
  display: grid;
  gap: var(--space-md);
  min-width: 0;
}

.hedging-live-price {
  color: var(--accent-strong);
}

.hedging-core-fields {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(180px, 0.7fr);
  gap: var(--space-sm);
  align-items: end;
}

.hedging-market-grid {
  min-width: 0;
}

.hedging-symbol-select select {
  height: 100%;
  padding: 0;
  border: 0;
  border-radius: inherit;
}

.hedging-direction-option[data-hedging-direction="long"].active {
  color: var(--good);
  background: var(--up-soft);
  border-color: var(--up-line);
}

.hedging-direction-option[data-hedging-direction="short"].active {
  color: var(--danger);
  background: var(--down-soft);
  border-color: var(--down-line);
}

.hedging-quantity-field .hedging-input-unit input {
  height: 52px;
}

.hedging-ticket-body.is-locked .hedging-symbol-select,
.hedging-ticket-body.is-locked .hedging-direction-switch {
  cursor: not-allowed;
  opacity: 0.48;
}

.hedging-ticket-body label {
  font-size: 10px;
}

.hedging-ticket-body input,
.hedging-ticket-body select {
  height: 38px;
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  font-family: var(--mono);
  font-size: 11px;
}

.hedging-ticket-body input:focus,
.hedging-ticket-body select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hedging-ticket-body.is-locked input:disabled,
.hedging-ticket-body.is-locked select:disabled,
.hedging-ticket-body.is-locked button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.hedging-input-unit {
  position: relative;
}

.hedging-input-unit input {
  padding-right: 54px;
}

.hedging-input-unit span {
  position: absolute;
  right: 10px;
  top: 50%;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  transform: translateY(-50%);
  pointer-events: none;
}

.hedging-quote-note {
  padding: var(--space-sm) var(--space-md);
  color: var(--muted);
  background: var(--panel);
  border: 1px dashed var(--line);
  border-radius: var(--radius-xs);
  font-size: 10px;
  line-height: 1.55;
}

.hedging-risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.hedging-risk-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
  padding: var(--space-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.hedging-risk-card.long {
  border-color: var(--up-line);
}

.hedging-risk-card.short {
  border-color: var(--down-line);
}

.hedging-risk-head {
  grid-column: 1 / -1;
  justify-content: flex-start;
  gap: var(--space-sm);
}

.hedging-risk-head span {
  min-width: 44px;
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 900;
  text-align: center;
}

.hedging-risk-card.long .hedging-risk-head span {
  color: var(--good);
}

.hedging-risk-card.short .hedging-risk-head span {
  color: var(--danger);
}

.hedging-risk-head strong {
  color: var(--text-2);
  font-size: 10px;
}

.hedging-route-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-sm);
}

.hedging-route-preview > div {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 2px var(--space-sm);
  padding: var(--space-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.hedging-route-preview span,
.hedging-route-preview small {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.hedging-route-preview strong {
  justify-self: end;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
}

.hedging-route-preview small {
  grid-column: 1 / -1;
}

.hedging-route-link {
  position: relative;
  display: block;
  height: 1px;
  background: var(--accent-line);
}

.hedging-route-link::before,
.hedging-route-link::after {
  content: "";
  position: absolute;
  top: -3px;
  width: 7px;
  height: 7px;
  border: 1px solid var(--accent);
  background: var(--surface);
  transform: rotate(45deg);
}

.hedging-route-link::before { left: 0; }
.hedging-route-link::after { right: 0; }

.hedging-message {
  color: var(--accent-strong);
}

.hedging-message.error {
  color: var(--danger);
}

.hedging-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
}

.hedging-actions button,
.hedging-refresh {
  min-height: 36px;
  border-radius: var(--radius-xs);
  font-size: 10px;
}

.hedging-monitor-summary {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.hedging-monitor-summary > summary {
  list-style: none;
  cursor: pointer;
}

.hedging-monitor-summary > summary::-webkit-details-marker {
  display: none;
}

.hedging-monitor-summary > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
}

.hedging-monitor-summary[open] > summary::after {
  content: "−";
}

.hedging-monitor-summary .hedging-refresh {
  margin-left: auto;
}

.hedging-summary-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.hedging-summary-metrics > div {
  min-width: 0;
  padding: var(--space-sm);
  background: var(--panel);
}

.hedging-summary-metrics span,
.hedging-summary-metrics strong {
  display: block;
}

.hedging-summary-metrics span {
  color: var(--muted);
  font-size: 9px;
}

.hedging-summary-metrics strong {
  margin-top: 5px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 18px;
}

.hedging-fee-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.hedging-fee-summary > div {
  min-width: 0;
  padding: var(--space-sm);
  background: var(--panel);
}

.hedging-fee-summary span,
.hedging-fee-summary strong {
  display: block;
}

.hedging-fee-summary span {
  color: var(--muted);
  font-size: 8px;
}

.hedging-fee-summary strong {
  margin-top: 4px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 10px;
}

.hedging-monitor-note {
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--line-soft);
  line-height: 1.55;
}

.hedging-sessions-head {
  padding-top: var(--space-xs);
  border-top: 1px solid var(--line-soft);
}

.hedging-sessions-head > span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
}

.hedging-session-list {
  display: grid;
  gap: var(--space-sm);
}

.hedging-empty {
  padding: 28px var(--space-md);
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius-xs);
  text-align: center;
}

.hedging-session-card {
  display: grid;
  gap: var(--space-sm);
  min-width: 0;
  padding: var(--space-md);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.hedging-session-card.unbalanced,
.hedging-session-card.partial_failure,
.hedging-session-card.error {
  border-color: var(--down-line);
}

@keyframes hedging-single-leg-border-pulse {
  0%, 100% {
    border-color: rgba(255, 179, 71, 0.34);
    box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.02);
  }
  50% {
    border-color: rgba(255, 179, 71, 0.72);
    box-shadow: 0 0 0 1px rgba(255, 179, 71, 0.09);
  }
}

.hedging-session-card.is-single-leg {
  animation: hedging-single-leg-border-pulse 2.8s ease-in-out infinite;
}

.hedging-session-status.single-leg {
  color: var(--warn);
  background: var(--accent-soft);
  border-color: var(--accent-line);
}

.hedging-session-title {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  min-width: 0;
}

.hedging-session-meta {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 9px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hedging-leg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-sm);
}

.hedging-leg {
  display: grid;
  gap: var(--space-sm);
  min-width: 0;
  padding: var(--space-sm);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.hedging-leg.long { border-color: var(--up-line); }
.hedging-leg.short { border-color: var(--down-line); }

.hedging-leg-direction {
  color: var(--good);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
}

.hedging-leg.short .hedging-leg-direction { color: var(--danger); }

.hedging-leg-account {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.hedging-leg-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 4px;
}

.hedging-leg-primary-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.hedging-leg-primary-metrics > div {
  min-height: 48px;
  padding: 8px;
}

.hedging-leg-primary-metrics > div.is-take-profit strong {
  color: var(--good);
}

.hedging-leg-primary-metrics > div.is-stop-loss strong {
  color: var(--danger);
}

.hedging-leg-primary-metrics > div.is-protection span {
  color: var(--text-2);
}

.hedging-leg-risk {
  min-width: 0;
  border-top: 1px solid var(--line-soft);
}

.hedging-leg-risk > summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding-top: 7px;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
}

.hedging-leg-risk > summary::-webkit-details-marker {
  display: none;
}

.hedging-leg-risk > summary::after {
  content: "+";
  grid-column: 3;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
  justify-self: end;
}

.hedging-leg-risk[open] > summary::after {
  content: "−";
}

.hedging-leg-risk > summary span {
  color: var(--text-2);
  font-size: 9px;
  font-weight: 760;
  white-space: nowrap;
}

.hedging-leg-risk > summary small {
  min-width: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hedging-leg-risk-metrics {
  margin-top: 6px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hedging-leg-risk-metrics > div {
  padding: 6px;
}

.hedging-leg-metrics > div {
  min-width: 0;
  padding: 7px;
  background: var(--surface);
}

.hedging-leg-metrics span,
.hedging-leg-metrics strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hedging-leg-metrics span {
  color: var(--muted);
  font-size: 8px;
}

.hedging-leg-metrics strong {
  margin-top: 4px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 9px;
}

.hedging-leg-metrics > div.is-positive strong { color: var(--good); }
.hedging-leg-metrics > div.is-negative strong { color: var(--danger); }

.hedging-leg-error,
.hedging-session-error {
  color: var(--danger);
  font-size: 9px;
  overflow-wrap: anywhere;
}

.hedging-session-fees {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.hedging-session-head-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex: 0 0 auto;
}

.hedging-close-button {
  min-height: 26px;
  padding: 0 var(--space-sm);
  border-radius: var(--radius-xs);
  border: 1px solid var(--danger);
  background: transparent;
  color: var(--danger);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.04em;
  cursor: pointer;
  white-space: nowrap;
}

.hedging-close-button:hover:not(:disabled) {
  background: var(--danger);
  color: var(--panel);
}

.hedging-close-button:disabled {
  opacity: 0.55;
  cursor: default;
}

.hedging-close-button.is-closing {
  border-style: dashed;
  opacity: 0.85;
}

.hedging-protection-panel {
  display: grid;
  gap: var(--space-sm);
  min-width: 0;
  padding: var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
}

.hedging-protection-panel > summary {
  list-style: none;
  cursor: pointer;
}

.hedging-protection-panel > summary::-webkit-details-marker {
  display: none;
}

.hedging-protection-panel > summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1;
}

.hedging-protection-panel[open] > summary::after {
  content: "−";
}

.hedging-protection-head,
.hedging-protection-option-title,
.hedging-protection-prices,
.hedging-protection-option small {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.hedging-protection-head {
  justify-content: space-between;
}

.hedging-protection-head > div {
  min-width: 0;
}

.hedging-protection-head strong {
  min-width: 0;
  color: var(--text-2);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.hedging-protection-state,
.hedging-protection-foot {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
}

.hedging-protection-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  min-width: 0;
  gap: 6px;
}

.hedging-protection-option {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 9px;
  color: var(--muted);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: left;
}

.hedging-protection-option:hover,
.hedging-protection-option:focus-visible,
.hedging-protection-option.active {
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.hedging-protection-option-title {
  min-width: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.hedging-protection-prices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.hedging-protection-prices em {
  min-width: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hedging-protection-option small {
  display: block;
  min-width: 0;
  color: var(--good);
  font-family: var(--mono);
  font-size: 8px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hedging-protection-empty {
  color: var(--muted);
  font-size: 10px;
}

@media (max-width: 980px) {
  .hedging-workspace {
    grid-template-columns: 1fr;
  }

  .hedging-monitor-note {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .hedging-account-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hedging-core-fields,
  .hedging-risk-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hedging-risk-card {
    grid-column: span 1;
    grid-template-columns: 1fr;
  }

  .hedging-risk-head {
    grid-column: 1;
  }

  .hedging-leg-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hedging-leg-primary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hedging-protection-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .account-switch-link[type="button"] {
    min-width: 62px;
    min-height: 25px;
    padding: 0 10px;
    font-size: 10px;
  }

  .hedging-page {
    gap: var(--space-sm);
  }

  #hedgingQuantity {
    font-size: 16px;
  }

  .hedging-page-head,
  .hedging-ticket-head,
  .hedging-monitor-head,
  .hedging-sessions-head {
    align-items: flex-start;
  }

  .hedging-title-block p {
    display: none;
  }

  .hedging-core-fields,
  .hedging-risk-grid,
  .hedging-protection-options {
    grid-template-columns: 1fr;
  }

  .hedging-leg-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .hedging-leg {
    gap: 6px;
    padding: 6px;
  }

  .hedging-leg-head {
    display: grid;
    align-items: start;
    gap: 3px;
  }

  .hedging-leg-metrics > div {
    padding: 5px;
  }

  .hedging-leg-primary-metrics > div {
    min-height: 45px;
    padding: 6px 5px;
  }

  .hedging-leg-risk-metrics {
    grid-template-columns: 1fr;
  }

  .hedging-leg-risk > summary {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 4px;
  }

  .hedging-leg-risk > summary small {
    font-size: 7px;
  }

  .hedging-leg-metrics strong {
    font-size: 8px;
  }

  body.hedging-mode .account-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: var(--space-sm);
  }

  .hedging-account-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
  }

  .hedging-account-overview-card {
    gap: 0;
    padding: 0;
  }

  .hedging-account-overview-head {
    align-items: center;
    min-height: 54px;
    padding: 7px 8px;
  }

  .hedging-account-overview-head h3 {
    font-size: 12px;
  }

  .hedging-account-overview-head small {
    max-width: 88px;
  }

  .hedging-account-config {
    min-height: 20px;
    padding: 0 5px;
    font-size: 8px;
  }

  .hedging-account-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hedging-account-metrics > div {
    min-height: 38px;
    padding: 6px;
    border-right: 1px solid var(--line-soft);
    border-bottom: 1px solid var(--line-soft);
  }

  .hedging-account-metrics > div:nth-child(2n) {
    border-right: 0;
  }

  .hedging-account-metrics > div:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .hedging-account-metrics span {
    font-size: 8px;
  }

  .hedging-account-metrics strong {
    font-size: 11px;
  }

  .hedging-risk-card {
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hedging-risk-head {
    grid-column: 1 / -1;
  }

  .hedging-route-preview {
    grid-template-columns: 1fr 34px 1fr;
    gap: 5px;
  }

  .hedging-route-preview > div {
    grid-template-columns: 1fr;
  }

  .hedging-route-preview strong {
    justify-self: start;
  }

  .hedging-actions {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  }

  .hedging-actions button {
    width: 100%;
    padding: 0 10px;
  }
}

@media (max-width: 380px) {
  .hedging-risk-card,
  .hedging-summary-metrics {
    grid-template-columns: 1fr;
  }

  .hedging-risk-head {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hedging-page *,
  .account-switch-link[type="button"] {
    transition: none !important;
  }

  .hedging-session-card.is-single-leg {
    animation: none;
    border-color: rgba(255, 179, 71, 0.58);
  }
}
